I can see a few problems here. First, does your solar feed upstream (grid side) of your mains CTs or downstream (load side). Some of your outputs treat it one way and some the other. Can you clarify?
Your output Total_Solar is only adding Phase_B and Phase_C. Assuming the leadin “0 min” is intended to eliminate negative standby load at night, it should be “0 max”. In the status above, Total_Solar should be 2,685 Watts.
The integrator Solar is unnecessary and should be the same as your Total_Solar as they are both monotonically increasing. You should delete that.
If your solar feeds in upstream (grid side) of the mains, your grid integrator is correct. If it feeds in downstream (load side) then it should be the same as Main_wh. In either case, you only need the resultant grid integrator.
Now it gets easier.
Export = grid.neg abs
Import = grid.pos
Consumption = grid.net + Phase_A_Solar + Phase_B_Solar + Phase_C_Solar
That’s one simple integrator and four outputs (including Total_Solar which I recommend you simplify to just Solar) that covers just about everything.