The phenomenon of voltage and or current harmonic distortion often occurs in industrial electrical system. The harmonic distortion waveforms are caused by non-linear loads. Active power filters can reduce harmonic distortion on almost any harmonic order that appears. The p-q theory is a widely used method to calculate harmonic reference currents that required. This paper proposes an active power filter controlling method that can determine the desired harmonic order to be compensated specifically. Through this method, only the desired harmonic order will be compensated. This proposed method increases the effectiveness of p-q theory in the calculation of current harmonic suppression. the simulation results show that the proposed method can suppress the desired harmonics to be compensated, ie 3rd order from THD 30% to 0.46%, while in 5th order from 10% to 0.09%.