Row total at end

Hello,

I have recently moved to Helical version 5 and I was trying to implement the row total but I do not see any option to do so, I was doing it in 4.1 version. Can you please share what can be done to get that back?

Thank You,
Netta.

Hello Netta,

Yes there are a lot of front end changes and functionality simplification in the new version. However, you can achieve the row total with the similar JavaScript like before to get a row total.

From the top right, select ‘Operations’ panel in Reports Module, and under ‘JS’ (for JavaScript) move to ‘Post Execution’ tab copy the following code and pate it there.

var result = data.reduce((sum, item) => sum + item.sum_travel_cost ,0);

data.push({sum_travel_cost: result, mode_of_payment:"Total"})

console.log("Total ",result);

This will add an additional row in the result set which will sum up all the values.

Here we are doing a total on column name ‘sum_travel_cost’ and adding it at the end. You can change the column names based on your needs.

It will not only add the total at the tabular data, but the same will be continued even on charts that you prepare on this data.

image

Thank You,
Helical Insight.

Further if you are using crosstab/pivot table, then we are by default having properties allowing to have various things like row total, column total etc.