In recent years, due to developments in the electricity industry, the use of smart meters has increased worldwide. Smart meters allow the collection of large amounts of microdata on power consumption. The data collected by smart meters can be used in various cases. Since the load duration curve is of great importance in the study of power systems in this paper, the purpose is to obtain the load duration curve of consumer groups using raw smart meter data. The data collected by smart meters reflects the behavior of subscribers, so by categorizing this data, the behavior of subscribers can be categorized, and thus the continuous load curve can be calculated. However, due to challenges such as being raw data collected from smart meters, the presence of anomalous data, and the presence of lost data, the data collected by smart meters need to be pre-processed and corrected. This paper presents an approach for pre-processing and modification of raw data received from smart meters and using them to calculate the load duration curve and other uses. First, the preprocessing and modification of smart meter data on two data sets collected from Alborz Power Distribution Company is done based on the presented method; Then these data are clustered based on the k-means clustering algorithm, and finally, load duration curve is obtained for each cluster.