Clustering historical electricity consumption data is very important for creating representative demand profiles for the planning and operation of the power grids. This paper investigates a multi-dimensional framework for data clustering, which takes scattering and separation metrics, as well as the number of clusters into account. A combination of wavelet mutation with the Invasive Weed Optimization (IWO) method for clustering features is proposed. One notable advantage of the IWO method over other metaheuristic optimization algorithms is its ability to dynamically adapt the number of weed colonies during the search process, resulting in improved exploration and exploitation of the search space. The proposed strategy is applied to cluster the electricity consumption data from a large municipal government center in Perth, Western Australia. The suggested method is then evaluated by comparing it with the well-known method in the literature, namely, the k-means technique. After the data clustering, the obtained results are implemented in the design of a multi-microgrid system under two different scenarios of cooperative and noncooperative modes. To evaluate the performance of the proposed method, the proposed method is implemented on the operational planning of a real multi-microgrid distribution system in Western Australia using linear programming to take the advantage of the mathematical-based solvers. After performing some investigations, the cooperative mechanism, where the microgrids have participated in supplying the demand of microgrids was found to yield to greater operational and investment cost minimimzation. In terms of numerical comparison, the total cost in the cooperative model is 6.5% lower than that in a non-cooperative situation.