cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Apply the following script on a table with aggregation's widget script to create a row with Grand Totals.
This will be considered as just another value and may not always appear on the first page of results if results are paginated.
widget.on('processresult', function(a,b){
 var totals = b.result.$$rows.reduce((arr,cur) => arr.map((val, i) => ({ data: val.data + cur[i].data })));
 totals[0].data = 'Grand Total';
 totals.forEach(function(i){
  i.text = i.data.toString()
 });
 b.result.$$rows.push(totals);
})
Comments
TJT
7 - Data Storage
7 - Data Storage

Is it possible to show Grand Total only for specific columns, basically only the aggregated columns.

Thanks

TJ

Version history
Last update:
‎03-02-2023 09:18 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: