For a correct power measurement, you have to average the product of instantaneous current and voltage. If using filters, they have to apply the same phase shift to voltage and current. You should be clear however, if you want to include the switching frequent power component with your measurement. They won't be large, according to the current waveform, but a certain amount can be expected. Otherwise you can filter the PWM frequent components, observing the said phase requirement.