According to Parsevals relation, the formulas which accurately represent the signal energy expressed in the time domain and frequency domain are acquired under the circumstances that the sampled signal is processed by discrete Fourier transform(DFT). In order to make the Hanning window compatible with the group concept recommended by International Electrotechnical Commission(IEC) standard, the prerequisite that the energy sum contributed by all spectral lines in the frequency domain must be equivalent to the energy of the sampled signal within the window has to be reached, and anenergy-loss correction factor” is proposed to achieve the prerequisite. By use of the energy-loss correction factor, an expression of the group concept related to Hanning window is obtained and completely compatible with the IEC technique. The method recommended by IEC to measure harmonics and interharmonics is extended, which can be completely expressed by using four measurement conditions and five measurement indices. For each measurement condition, the factors that may affect the measuring accuracy are carefully analyzed, and the measurement index which has the best overall performance in certain measurement condition is selected as the specific optimal measurement index. The most accurate results can be obtained in practical measurement through the application of the specific optimal measurement index.