Power quality problems cause the damage and inefficient operation of the electronic devices and sensitive loads, and lead to substantial economic losses. In order to eliminate these problems, Distribution Static Synchronous Compensator (D-STATCOM) is widely used due to the fast response to the changes in the system dynamics and the capability of controlling the power system parameters. In this research study, D-STATCOM, having a control method based on General Wavelet Transform, is firstly introduced and the balanced/unbalanced voltage fluctuations, current/voltage harmonics and reactive power that are most common types of power quality problems in the distribution systems are simultaneously compensated. With this study, it is the first time to formulate the general wavelet algorithm as mathematically in the literature. The performance of the proposed method is tested with several case studies by using PSCAD/EMTDC program.