In recent years, there have been rapid increases in the number of network-connected devices such as computers, smartphones, and Internet of Things devices. Thus, large amounts of data have been accumulated such as locational data, website search histories, and power usage data. These data are used in various types of services. However, these data cannot be used easily for secondary purposes in some countries because of privacy problems. Therefore, privacy protection is necessary to apply these data in secondary uses where data anonymization is the usual solution. Many conventional methods are used for anonymizing power usage data, but the conventional method has three problems. First, it cannot anonymize time-series data. Second, the information loss is so large in the conventional method that the anonymized data are no longer suitable for secondary uses. Third, the conventional method cannot preserve the type of electrical appliance used. In this study, we propose a method for anonymizing power demand data, where sparse coding is used to solve the three problems that affect the conventional method. The proposed method can anonymize time series-data and it allows data to be analyzed at a chosen time. The proposed method was used to anonymize power usage data from the Urban Design Center Misono (UDCMi) and the experimental error rate decreased compared with the conventional method. The dictionary produced using the proposed method represents the electrical appliance data.