Due to the high number of photovoltaic (PV) inverters installed, in some regions of the UK the power generated under peak conditions exceeds the transmission system capacity limits. With the aim to mitigate this condition and operate the grid within its design limits, utilities curtail PV output power, thus causing financial loss for the PV system owners and limiting the use of the installed components. The control system proposed in this paper allows using the PV inverter as an Active Filter (AF), when the output power is curtailed, thus improving the system power quality and exploiting the installed MVA. A novel contribution is the description of a harmonic derating coefficient which limits harmonic current injection based on the fundamental current generated by the inverter. The proposed application fits within the scope of the smart grid, where multi-functional inverters can be controlled by utilities to improve grid operating conditions.