I am running a SQL query that outputs the below
There are more than 3 EventTypes (maybe 12 in total), but I've left it 3 for simplicity
In my flow, the final step is to create a html table and everything is working fine there
However I want to add a Total Row with the SUM of the TotalTurnover, NetPosition, Count and ClientCount to the footer of the html table
I have seen solutions on here for using an Apply For Each and Initialize Variable (Total) to 0, but the issue here is that I have 4 different columns that I want to get the Total for and that seems very messy and complicated.
I'm thinking there has to be a cleaner way of calculating a simple Total and adding that new row to the foot of your html table?
{
"statusCode": 200,
"headers": {
"Pragma": "no-cache",
"Transfer-Encoding": "chunked",
"Vary": "Accept-Encoding",
"x-ms-request-id": "7e5d61e5-6e93-406e-8cfc-b25386a6ea8a",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "DENY",
"x-ms-connection-gateway-object-id": "dd14613e-450d-411d-a8ae-03017cbcd0cc",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Cache-Control": "no-store, no-cache",
"Date": "Sun, 20 Nov 2022 11:29:59 GMT",
"Content-Type": "application/json; charset=utf-8; odata.metadata=minimal",
"Expires": "-1",
"Content-Length": "2446"
},
"body": {
"ResultSets": {
"Table1": [
{
"EventType": "Soccer",
"TotalTurnover": 989.1,
"NetPosition": 143.412,
"Margin": 0.14501,
"Count": 1649,
"ClientCount": 484
},
{
"EventType": "Tennis",
"TotalTurnover": 614.98,
"NetPosition": 173.5836,
"Margin": 0.28207,
"Count": 401,
"ClientCount": 136
},
{
"EventType": "Golf",
"TotalTurnover": 2071.5,
"NetPosition": 849.6833,
"Margin": 0.410177,
"Count": 58,
"ClientCount": 33
}
]
},
"OutputParameters": {}