In this paper, power flow analysis of a three-phase four-wire system with a shunt active power filter in steady state is presented. The analysis begins with a mathematical model of the power inverter and continues to find the relationship of the real and imaginary power as well as zero sequence power in the grid, loads, and the inverter (AC and DC sides) for successful compensation. The system includes mixed non-linear loads with significant unbalanced components. The filter consists of a three-phase current-controlled voltage source inverter (CC-VSI) with a filter inductance at the AC output and a DC-bus capacitor. The CC-VSI is operated to directly control the AC grid current to be sinusoidal and in phase with the grid voltage. Computer simulation results verify the concept of the filter and the power flow.