will this work?
you need node-red-contrib-calc
contrib node
[{"id":"8618330606b79d89","type":"join","z":"c0b4d8b015901a0c","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":370,"y":200,"wires":[["674c590a9310e2e4"]]},{"id":"f86265e069a42c1c","type":"inject","z":"c0b4d8b015901a0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"kwh","payload":"-700","payloadType":"num","x":200,"y":140,"wires":[["8618330606b79d89"]]},{"id":"460512ee9cb22580","type":"inject","z":"c0b4d8b015901a0c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"kwh","payload":"400","payloadType":"num","x":200,"y":220,"wires":[["8618330606b79d89"]]},{"id":"674c590a9310e2e4","type":"calculator","z":"c0b4d8b015901a0c","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"","round":true,"decimals":0,"x":510,"y":200,"wires":[["3f9e54561e96a04e"]]},{"id":"3f9e54561e96a04e","type":"calculator","z":"c0b4d8b015901a0c","name":"","inputMsgField":"payload","outputMsgField":"payload","operation":"abs","constant":"","round":true,"decimals":0,"x":680,"y":200,"wires":[["e471835148da203d"]]},{"id":"e471835148da203d","type":"debug","z":"c0b4d8b015901a0c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":200,"wires":[]}]