Reducing a complexity of the flow

Hello there,
I wanted to do some mathematical calculations hence I created below flow which is working ok but it is bit complex.
Please help me to make it simpler.

what I have done is,
6 readings -- changes node to set topic(displayed using text node)--Summation of them-- % of each of the 6 readings with respect to total of 6--Displayed using text node
(repeated for other 6 reading as below)
6 readings -- changes node to set topic(displayed using text node)--Summation of them-- % of each of the 6 readings with respect to total of 6--Displayed using text node
(then)
Subtraction for each of the 6 readings.

[{"id":"6fad6ce1.d69df4","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Batch_Set_Point","rules":[{"t":"set","p":"topic","pt":"msg","to":"Batch_Set_Point","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":140,"wires":[["da0e6d3d.fafd6","bc80eeb8.0bfad","72df64c7.48ce8c","d22756ef.71a0e8","b8b40129.9847e","11a66271.8104ee"]]},{"id":"46e2218d.618d4","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg1_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg1_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":220,"wires":[["6d00d662.6cfcb8","29e41cc9.ebb4f4","efb9218c.d4fd5","206e208c.aa83e"]]},{"id":"cbc1afa9.719b7","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg3_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg3_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":520,"wires":[["5a29c9c5.3e4a18","72df64c7.48ce8c"]]},{"id":"ef831f1.3c948e","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg3_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg3_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":480,"wires":[["6d00d662.6cfcb8","12a7b650.21332a","206e208c.aa83e","d8b1bd5a.2c2b6"]]},{"id":"7dee386.c65f9c8","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg2_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg2_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":380,"wires":[["5a29c9c5.3e4a18","bc80eeb8.0bfad"]]},{"id":"330c6a75.226cb6","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg2_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg2_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":340,"wires":[["6d00d662.6cfcb8","da87601b.73243","206e208c.aa83e","bd4d690a.61ae48"]]},{"id":"33f7980f.161f98","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg1_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg1_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":260,"wires":[["5a29c9c5.3e4a18","da0e6d3d.fafd6"]]},{"id":"6268f4c5.c3a49c","type":"change","z":"ef1b3a9d.a6c5e8","name":"Total_Curr_Weight","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg1_Curr) + $number(payload.Agg2_Curr)+ $number(payload.Agg3_Curr)+ $number(payload.Agg4_Curr)+ $number(payload.Bitumen_Curr)+ $number(payload.Filler_Curr)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Total_Curr_Weight","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":100,"wires":[["bd4d690a.61ae48","d8b1bd5a.2c2b6","c72b15ae.ebee98","b8b35dfc.bd8b8","d06761b3.a7d19","f7b2e764.7a3648","29e41cc9.ebb4f4"]]},{"id":"335110c6.6958a","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg1_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg1_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg1_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":260,"wires":[["626bc123.a1266","8f2d1a91.18f8d8"]]},{"id":"fcbd8be.d45c778","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg1_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg1_Curr))/ $number(payload.Total_Curr_Weight)\t ","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg1_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":220,"wires":[["626bc123.a1266","30cb8cbe.814fc4"]]},{"id":"a4ba06e.98a10f8","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Filler_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Filler_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":840,"wires":[["6d00d662.6cfcb8","e526ce94.718df","206e208c.aa83e","d06761b3.a7d19"]]},{"id":"6c1de8d3.cf0798","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Bitumen_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Bitumen_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":760,"wires":[["5a29c9c5.3e4a18","b8b40129.9847e"]]},{"id":"b51201a6.d3e25","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Bitumen_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Bitumen_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":720,"wires":[["6d00d662.6cfcb8","6ee32f7b.e5563","206e208c.aa83e","b8b35dfc.bd8b8"]]},{"id":"beb6dacf.b40748","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg4_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg4_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":640,"wires":[["5a29c9c5.3e4a18","d22756ef.71a0e8"]]},{"id":"f66f05fb.a147c8","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Agg4_Curr","rules":[{"t":"set","p":"topic","pt":"msg","to":"Agg4_Curr","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":600,"wires":[["6d00d662.6cfcb8","c1eeec13.dacdb","206e208c.aa83e","c72b15ae.ebee98"]]},{"id":"2a3a46c6.9d40fa","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg1_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg1_Set_Weight_Per)- $number(payload.Agg1_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg1_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":240,"wires":[["1c7b5af8.82a7b5"]]},{"id":"91c2c49b.9e1038","type":"change","z":"ef1b3a9d.a6c5e8","name":"set topic to Filler_Set","rules":[{"t":"set","p":"topic","pt":"msg","to":"Filler_Set","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"payload[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":880,"wires":[["5a29c9c5.3e4a18","11a66271.8104ee"]]},{"id":"fd5b328d.4a7ee","type":"change","z":"ef1b3a9d.a6c5e8","name":"Total_Set_Weight","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg1_Set) + $number(payload.Agg2_Set)+ $number(payload.Agg3_Set)+ $number(payload.Agg4_Set)+ $number(payload.Bitumen_Set)+ $number(payload.Filler_Set)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Total_Set_Weight","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":960,"wires":[[]]},{"id":"8a17bbcd.92df98","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg2_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg2_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg2_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":380,"wires":[["c9330792.33ceb8","8c12fbf0.189968"]]},{"id":"6893a240.558e4c","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg2_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg2_Curr))/ $number(payload.Total_Curr_Weight)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg2_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":340,"wires":[["c9330792.33ceb8","f4ed8a96.219948"]]},{"id":"6b961d12.b95554","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg2_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg2_Set_Weight_Per)- $number(payload.Agg2_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg2_Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":360,"wires":[["fbe4eeca.1fb5c"]]},{"id":"9d22b53c.b0f458","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg3_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg3_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg3_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":520,"wires":[["62adf592.24444c","1025bb8b.912354"]]},{"id":"7d16af17.c7e1d","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg3_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg3_Curr))/ $number(payload.Total_Curr_Weight)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg3_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":480,"wires":[["62adf592.24444c","59678e43.d81f3"]]},{"id":"2fc7c3a0.b78b9c","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg3_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg3_Set_Weight_Per)- $number(payload.Agg3_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg3_Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":500,"wires":[["153c75e6.3227da"]]},{"id":"1a0b9292.9ba35d","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg4_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg4_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg4_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":640,"wires":[["94af3703.b24ea8","ddd509dc.488dc8"]]},{"id":"50fc3ccb.0ff204","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg4_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Agg4_Curr))/ $number(payload.Total_Curr_Weight)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg4_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":600,"wires":[["94af3703.b24ea8","23e39ad6.1f33d6"]]},{"id":"b6d4e1f8.9000b","type":"change","z":"ef1b3a9d.a6c5e8","name":"Agg4_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Agg4_Set_Weight_Per)- $number(payload.Agg4_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg4_Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":620,"wires":[["e5b88c16.db081"]]},{"id":"70b02d2d.c05614","type":"change","z":"ef1b3a9d.a6c5e8","name":"Bitumen_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Bitumen_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Bitumen_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":760,"wires":[["39f20074.b0c71","fc012329.60bf1"]]},{"id":"7dfb3d77.c129d4","type":"change","z":"ef1b3a9d.a6c5e8","name":"Bitumen_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Bitumen_Curr))/ $number(payload.Total_Curr_Weight)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Bitumen_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1240,"y":720,"wires":[["39f20074.b0c71","b57a7e96.e3aae"]]},{"id":"605598da.dcc6d8","type":"change","z":"ef1b3a9d.a6c5e8","name":"Bitumen_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Bitumen_Set_Weight_Per)- $number(payload.Bitumen_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Agg1_Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1600,"y":740,"wires":[["dc2a6059.81994"]]},{"id":"320b1c60.196354","type":"change","z":"ef1b3a9d.a6c5e8","name":"Filler_Set%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Filler_Set))/ $number(payload.Batch_Set_Point)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Filler_Set_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":880,"wires":[["78c82f72.99d07","2ea8ff9c.29723"]]},{"id":"13505e83.0a95e1","type":"change","z":"ef1b3a9d.a6c5e8","name":"Filler_Curr%","rules":[{"t":"set","p":"payload","pt":"msg","to":"(100*$number(payload.Filler_Curr))/ $number(payload.Total_Curr_Weight)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Filler_Curr_Weight_Per","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1230,"y":840,"wires":[["78c82f72.99d07","1f05a0ad.dead7f"]]},{"id":"7ac0c0b7.bc64c","type":"change","z":"ef1b3a9d.a6c5e8","name":"Filler_Error","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number(payload.Filler_Set_Weight_Per)- $number(payload.Filler_Curr_Weight_Per)\t","tot":"jsonata"},{"t":"set","p":"topic","pt":"msg","to":"Filler_Error","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1590,"y":860,"wires":[["99a05140.cba39"]]},{"id":"7d8226df.c8d0c8","type":"function","z":"ef1b3a9d.a6c5e8","name":"","func":"msg = {\n    \"payload\":[\n        {\n            \"labels\":[\"Agg1\",\"Agg2\",\"Agg3\",\"Agg4\",\"Bitumen\",\"Filler\"],\n            \"data\":[[msg.payload.Agg1_Curr,msg.payload.Agg2_Curr,msg.payload.Agg3_Curr,msg.payload.Agg4_Curr,msg.payload.Bitumen_Curr,msg.payload.Filler_Curr]],\n            \"series\":[\"Current Weight\"]}]\n}\nreturn msg;","outputs":1,"language":"javascript","noerr":0,"x":1160,"y":60,"wires":[["3898fff5.97a31"]]},{"id":"206e208c.aa83e","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"6","x":1010,"y":60,"wires":[["7d8226df.c8d0c8"]]},{"id":"6d00d662.6cfcb8","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"6","x":1050,"y":100,"wires":[["6268f4c5.c3a49c"]]},{"id":"29e41cc9.ebb4f4","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1070,"y":220,"wires":[["fcbd8be.d45c778"]]},{"id":"da0e6d3d.fafd6","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1150,"y":300,"wires":[["335110c6.6958a"]]},{"id":"626bc123.a1266","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":240,"wires":[["2a3a46c6.9d40fa"]]},{"id":"5a29c9c5.3e4a18","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"6","x":1010,"y":960,"wires":[["fd5b328d.4a7ee"]]},{"id":"bd4d690a.61ae48","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":340,"wires":[["6893a240.558e4c"]]},{"id":"bc80eeb8.0bfad","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":380,"wires":[["8a17bbcd.92df98"]]},{"id":"c9330792.33ceb8","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":360,"wires":[["6b961d12.b95554"]]},{"id":"d8b1bd5a.2c2b6","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":480,"wires":[["7d16af17.c7e1d"]]},{"id":"72df64c7.48ce8c","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":520,"wires":[["9d22b53c.b0f458"]]},{"id":"62adf592.24444c","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":500,"wires":[["2fc7c3a0.b78b9c"]]},{"id":"c72b15ae.ebee98","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":600,"wires":[["50fc3ccb.0ff204"]]},{"id":"d22756ef.71a0e8","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":640,"wires":[["1a0b9292.9ba35d"]]},{"id":"94af3703.b24ea8","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":620,"wires":[["b6d4e1f8.9000b"]]},{"id":"b8b35dfc.bd8b8","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":720,"wires":[["7dfb3d77.c129d4"]]},{"id":"b8b40129.9847e","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":760,"wires":[["70b02d2d.c05614"]]},{"id":"39f20074.b0c71","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":740,"wires":[["605598da.dcc6d8"]]},{"id":"d06761b3.a7d19","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":840,"wires":[["13505e83.0a95e1"]]},{"id":"11a66271.8104ee","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1050,"y":880,"wires":[["320b1c60.196354"]]},{"id":"78c82f72.99d07","type":"join","z":"ef1b3a9d.a6c5e8","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","x":1410,"y":860,"wires":[["7ac0c0b7.bc64c"]]},{"id":"3898fff5.97a31","type":"ui_chart","z":"ef1b3a9d.a6c5e8","name":"","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"6","label":"Weight  (kg)","chartType":"pie","legend":"true","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#ff8800","#fbf304","#2ca02c","#9e04f1","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":1330,"y":60,"wires":[[]]},{"id":"efb9218c.d4fd5","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg1","format":"{{msg.payload}}","layout":"row-left","x":830,"y":180,"wires":[]},{"id":"da87601b.73243","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg2","format":"{{msg.payload | number: 2}}","layout":"row-left","x":830,"y":300,"wires":[]},{"id":"12a7b650.21332a","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg3","format":"{{msg.payload | number: 2}}","layout":"row-left","x":830,"y":440,"wires":[]},{"id":"c1eeec13.dacdb","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg4","format":"{{msg.payload | number: 2}}","layout":"row-left","x":830,"y":560,"wires":[]},{"id":"6ee32f7b.e5563","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Bitumen","format":"{{msg.payload | number: 2}}","layout":"row-left","x":840,"y":680,"wires":[]},{"id":"e526ce94.718df","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Filler","format":"{{msg.payload | number: 2}}","layout":"row-left","x":830,"y":800,"wires":[]},{"id":"1c7b5af8.82a7b5","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg1","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1750,"y":240,"wires":[]},{"id":"fbe4eeca.1fb5c","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg2","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1770,"y":360,"wires":[]},{"id":"153c75e6.3227da","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg3","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1770,"y":500,"wires":[]},{"id":"e5b88c16.db081","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg4","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1770,"y":620,"wires":[]},{"id":"dc2a6059.81994","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Bitumen","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1780,"y":740,"wires":[]},{"id":"99a05140.cba39","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"8e2e3f91.f98e3","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Filler","format":"{{msg.payload | number: 2}}","layout":"row-spread","x":1770,"y":860,"wires":[]},{"id":"f7b2e764.7a3648","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"92fddf4a.6ed3a","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Total ","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1430,"y":100,"wires":[]},{"id":"30cb8cbe.814fc4","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg1","format":" {{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":200,"wires":[]},{"id":"8f2d1a91.18f8d8","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg1","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":280,"wires":[]},{"id":"f4ed8a96.219948","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg2","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":320,"wires":[]},{"id":"8c12fbf0.189968","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg2","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":400,"wires":[]},{"id":"59678e43.d81f3","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg3","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":460,"wires":[]},{"id":"1025bb8b.912354","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg3","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":540,"wires":[]},{"id":"23e39ad6.1f33d6","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg4","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":580,"wires":[]},{"id":"ddd509dc.488dc8","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Agg4","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":660,"wires":[]},{"id":"b57a7e96.e3aae","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Bitumen","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1420,"y":700,"wires":[]},{"id":"fc012329.60bf1","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Bitumen","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1420,"y":780,"wires":[]},{"id":"1f05a0ad.dead7f","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"c8893ef8.e8f24","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Filler","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":820,"wires":[]},{"id":"2ea8ff9c.29723","type":"ui_text","z":"ef1b3a9d.a6c5e8","group":"d934600f.4f9ef","order":0,"width":"6","singleBrowser":false,"height":"1","name":"","label":"Filler","format":"{{msg.payload | number: 2}}","layout":"row-left","x":1410,"y":900,"wires":[]},{"id":"92fddf4a.6ed3a","type":"ui_group","z":"","name":"Production during Last Batch","tab":"975e5c7e.bc29e","order":1,"disp":true,"width":"6","collapse":false,"_type":"config"},{"id":"8e2e3f91.f98e3","type":"ui_group","z":"","name":"Error","tab":"975e5c7e.bc29e","order":2,"disp":true,"width":"6","collapse":false,"_type":"config"},{"id":"c8893ef8.e8f24","type":"ui_group","z":"","name":"Achived  Recipie (%)","tab":"975e5c7e.bc29e","order":7,"disp":true,"width":"6","collapse":false,"_type":"config"},{"id":"d934600f.4f9ef","type":"ui_group","z":"","name":"Targeted Recipie (%)","tab":"975e5c7e.bc29e","order":8,"disp":true,"width":"6","collapse":false,"_type":"config"},{"id":"975e5c7e.bc29e","type":"ui_tab","z":"","name":"Production Data","icon":"dashboard","publicAccess":"true","fmAccess":"none","fmAccessType":"private","assetType":"","asset":"","assetName":"","assetText":"","image":"","description":"","hideTitleBar":false,"_type":"config"}]

What is the source of the data, I see that it comes from an array, but it is always element 0. Is the data split up before this flow ?

Node from which I am giving input to the change node is gives value as below.

Screenshot (152)

Understood, is that coming from mqtt ? if yes, could you listen to ..../BatchMix/# so that you have all values at once that can be joined ?

Actually, I am using Mindsphere which is based on node red. so, I am reading using timeseries node then extracting it to get individual variable and then goes according to this flow.
I am attaching the image and the whole flow.


flows (15).json (37.0 KB)

Those "extract parameter" nodes are unknown nodes in node-red.

then extracting it to get individual variable

This is where the complexity got introduced.

If you have an array of data, you can process the array as a whole and perform calculations directly without splitting everything up.

Thank you so much!
Please help me bit more.
I have done it with 2 variables to just check. Now I don't know how to get multiple outputs from function node.

This is what I have written in the function node...

let Agg1_Set = msg.payload[0].Agg1_Set_Weight;
let Agg1_Cur = msg.payload[0].Agg1_Current_Weight;
let Agg2_Set = msg.payload[0].Agg2_Set_Weight;
let Agg2_Cur = msg.payload[0].Agg2_Current_Weight;
let total_Cur=Agg1_Cur+Agg2_Cur;
let total_Set=Agg1_Cur+Agg2_Cur;

let Agg1_Cur_per= (100*Agg1_Cur)/total_Cur;
let Agg2_Cur_per= (100*Agg2_Cur)/total_Cur;

let Agg1_Set_per= (100*Agg1_Set)/total_Cur;
let Agg2_Set_per= (100*Agg2_Set)/total_Cur;

let Error_Agg1=Agg1_Set_per-Agg1_Cur_per;
let Error_Agg2= Agg2_Set_per-Agg2_Cur_per;

msg.payload = total_Cur; 
return msg;

Below is what I want to display(need as outputs from function node) ...
6 variables (Agg1_Set, Agg2_Set..)
6 variables(Agg1_Cur, Agg2_Cur...)
6 variables(Agg1_Cur_per, Agg2_Cur_per...)
6 variables(Agg1_Set_per, Agg2_Set_per...)
6 variables(Error_Agg1,Error_Agg2...)

I think it will help if you can show the output that is coming out of the Agg1 to Bitumen node as you seem to extract data after that.

Sorry, forgot to attach

It's much easier to understand the issue and provide support if you post actual data instead of a picture of the data!

1 Like

[{"Agg1_Set_Weight":200,"Agg1_Current_Weight":177.48,"Agg2_Current_Weight":201.59999,"Agg2_Set_Weight":210,"_time":"2023-01-11T05:45:05.075Z"}]

You could use a function node like this:


// const input = msg.payload

const input = [
    {
        "Agg1_Set_Weight": 200,
        "Agg1_Current_Weight": 177.48,
        "Agg2_Current_Weight": 201.59999,
        "Agg2_Set_Weight": 210
    }
]
const numberOfElements = 2 // = Agg1,Agg2 etc

function percentage(index,type,total){
    const el = input[0][`Agg${index}_${type}_Weight`]
    return (100 * el) / total
}

function getTotal(type){
    let total = 0
    for(let index = 1; index<numberOfElements+1;index++){
        total += input[0][`Agg${index}_${type}_Weight`]
    }
    return total
}

const total_Current = getTotal('Current')
const total_Set = getTotal('Set')

input[0].total_Current = total_Current
input[0].total_Set = total_Set

for (let index = 1; index < numberOfElements + 1; index++) {
    input[0][`Agg${index}_Current_percentage`] = percentage(index, 'Current', total_Current)
    input[0][`Agg${index}_Set_percentage`] = percentage(index, 'Set', total_Set)
    input[0][`Agg${index}_Error`] = input[0][`Agg${index}_Set_percentage`] - input[0][`Agg${index}_Current_percentage`]
}

msg.payload = input
return msg

(pretty sure this can be more cleanly be refactored)

It produces this as output:

But I would also recommend to produce an array as output instead, which in turn could be fed into a ui_table node, so your flow could be reduced to 4 nodes (excluding the chart)

1 Like

Please help me bit more.
I am unable to understand the above function. where I should I write what?

&
Is below, correct?
edit:

const input = [
    {
        "Agg1_Cur" : msg.payload[0].Agg1_Current_Weight,
        "Agg2_Cur" : msg.payload[0].Agg2_Current_Weight,
        "Agg3_Cur" : msg.payload[0].Agg1_Current_Weight,
        "Agg4_Cur" : msg.payload[0].Agg2_Current_Weight,
        "Bitumen_Cur" : msg.payload[0].Bitumen_Current_Weight,
        "Filler_Cur" : msg.payload[0].Filler_Current_Weight
    }
]

Below is what I have written in the Function Node

// const input = msg.payload

const input = [
    {
      /*  "Agg1_Set_Weight": 200,
        "Agg1_Current_Weight": 177.48,
        "Agg2_Current_Weight": 201.59999,
        "Agg2_Set_Weight": 210*/
        
        "Agg1_Cur" : msg.payload[0].Agg1_Current_Weight,
        "Agg2_Cur" : msg.payload[0].Agg2_Current_Weight,
        "Agg3_Cur" : msg.payload[0].Agg1_Current_Weight,
        "Agg4_Cur" : msg.payload[0].Agg2_Current_Weight,
        "Bitumen_Cur" : msg.payload[0].Bitumen_Current_Weight,
        "Filler_Cur" : msg.payload[0].Filler_Current_Weight,
        
        "Agg1_Set" : msg.payload[0].Agg1_Set_Weight,
        "Agg2_Set" : msg.payload[0].Agg2_Set_Weight,
        "Agg3_Set" : msg.payload[0].Agg1_Set_Weight,
        "Agg4_Set" : msg.payload[0].Agg2_Set_Weight,
        "Bitumen_Set" : msg.payload[0].Bitumen_Set_Weight,
        "Filler_Set" : msg.payload[0].Filler_Set_Weight
        
    }
];
const numberOfElements = 4; // = Agg1,Agg2 etc

function percentage(index,type,total){
    const el = input[0][`Agg${index}_${type}_Weight`];
    return (100 * el) / total;
}

function getTotal(type){
    let total = 0;
    for(let index = 1; index<numberOfElements+1;index++){
        total += input[0][`Agg${index}_${type}_Weight`];
    }
    return total;
}

const total_Current = getTotal('Current');
const total_Set = getTotal('Set');

input[0].total_Current = total_Current;
input[0].total_Set = total_Set;

for (let index = 1; index < numberOfElements + 1; index++) {
    input[0][`Agg${index}_Current_percentage`] = percentage(index, 'Current', total_Current);
    input[0][`Agg${index}_Set_percentage`] = percentage(index, 'Set', total_Set);
    input[0][`Agg${index}_Error`] = input[0][`Agg${index}_Set_percentage`] - input[0][`Agg${index}_Current_percentage`];
}

msg.payload = input;
return msg;

Getting in debug pen
[{"Agg1_Cur":210.6,"Agg2_Cur":210.6,"Agg3_Cur":210.6,"Agg4_Cur":210.6,"Bitumen_Cur":80.46,"Filler_Cur":0,"Agg1_Set":200,"Agg2_Set":210,"Agg3_Set":200,"Agg4_Set":210,"Bitumen_Set":50,"Filler_Set":50,"total_Current":null,"total_Set":null,"Agg1_Current_percentage":null,"Agg1_Set_percentage":null,"Agg1_Error":null,"Agg2_Current_percentage":null,"Agg2_Set_percentage":null,"Agg2_Error":null,"Agg3_Current_percentage":null,"Agg3_Set_percentage":null,"Agg3_Error":null,"Agg4_Current_percentage":null,"Agg4_Set_percentage":null,"Agg4_Error":null}]

I guess
const el = input[0][Agg${index}_${type}_Weight];
total += input[0][Agg${index}_${type}_Weight];
input[0][Agg${index}_Error] = input[0][Agg${index}_Set_percentage] - input[0]
is what I have to change.
But don't know what to write instead
Please help me with this!

You can just set:

const input = msg.payload
const numberOfElements = 4; // = Agg1,Agg2 etc

Edit:
I am unable to get Bitumen_Current_percentage,Bitumen_Set_percentage, Bitumen_Error, Filler_Current_percentage,Filler_Set_percentage, Filler_Error

What I am getting in debug ...
[{"Agg1_Current_Weight":210.6,"Agg1_Set_Weight":200,"Agg2_Current_Weight":210.6,"Agg2_Set_Weight":210,"Agg3_Current_Weight":246.59998,"Agg3_Set_Weight":220,"Agg4_Current_Weight":241.20001,"Agg4_Set_Weight":270,"Bitumen_Current_Weight":80.46,"Bitumen_Set_Weight":50,"Filler_Current_Weight":0,"Filler_Set_Weight":50,"_time":"2023-01-11T11:57:31.776Z","total_Current":908.99999,"total_Set":900,"Agg1_Current_percentage":23.168317086560144,"Agg1_Set_percentage":22.22222222222222,"Agg1_Error":-0.9460948643379226,"Agg2_Current_percentage":23.168317086560144,"Agg2_Set_percentage":23.333333333333332,"Agg2_Error":0.16501624677318816,"Agg3_Current_percentage":27.12871096951277,"Agg3_Set_percentage":24.444444444444443,"Agg3_Error":-2.6842665250683275,"Agg4_Current_percentage":26.534654857366938,"Agg4_Set_percentage":30,"Agg4_Error":3.465345142633062}]

Also
what and Where I should write to round up to 2 decimal point.(00.00)?

I am unable to get Bitumen_Current_percentage,Bitumen_Set_percentage, Bitumen_Error,

Because you did not ask for that ?

what and Where I should write to round up to 2 decimal point.(00.00)?

It is best to do this in the dashboard nodes directly and keep the values for what they are - in case you ever want to use them further in a flow, unless you don't mind rounding errors.

in dashboard text node you can use:

{{ msg.payload[0].Agg1_Current_Weight | number:2 }}

which will produce 2 decimals.

I thought, by keeping ref what you have written I will be able to do so. But now, I am unable to do. that's why asking it.

Actually, I am Trying to use table node directly.
For that I have written as below,

  msg.payload = [
    {
        "Name": "Agg1",  
        "Last Bactch": msg.payload[0].Agg1_Current_Weight,
        "Achived Recipie(%)": msg.payload[0].Agg1_Current_percentage,
        "Targated Recipie(%)": msg.payload[0].Agg1_Set_percentage,
        "Error in Recipie(%)": msg.payload[0].Agg1_Error
    },
    {
        "Name": "Agg2",
        "Last Bactch": msg.payload[0].Agg2_Current_Weight,
        "Achived Recipie (%)": msg.payload[0].Agg2_Current_percentage,
        "Targated Recipie (%)": msg.payload[0].Agg2_Set_percentage,
        "Error in Recipie (%)": msg.payload[0].Agg2_Error
    },
    {
        "Name": "Agg3",  
        "Last Bactch": msg.payload[0].Agg3_Current_Weight,
        "Achived Recipie(%)": msg.payload[0].Agg3_Current_percentage,
        "Targated Recipie(%)": msg.payload[0].Agg3_Set_percentage,
        "Error in Recipie(%)": msg.payload[0].Agg3_Error
    },
    {
        "Name": "Agg4",  
        "Last Bactch": msg.payload[0].Agg4_Current_Weight,
        "Achived Recipie(%)": msg.payload[0].Agg4_Current_percentage,
        "Targated Recipie(%)": msg.payload[0].Agg4_Set_percentage,
        "Error in Recipie(%)": msg.payload[0].Agg4_Error
    }
  ];
  return msg;

If you want to produce an array instead, then the function node can be rewritten to make this much easier. That is why it is important to ask the right questions and provide the "raw" input and the expected output.

There is no need to write everything manually (hard to maintain), but we can only help if we know the input/output.

Sorry for the inconvenience Sir.
Initially I ware planning to display in text node only. but I realis your suggestion to display in table will be better.
Please help me with this. Next time I will take care of it.

Edit:
Now, you now about input already and in output I am trying to get as below
Material (Agg2...Filler), Current Weight, Set Weight, Current Percentage, Set Percentage, Error Percentage as row Heading and then values in Column under the particular row.