cancel
Showing results for 
Search instead for 
Did you mean: 
Community_Admin
Community Team Member
Community Team Member

*****Windows Only****

When having a pivot table which contains more than one value and present the grand total for each of the values, the total row is called “Grand Total”

Community_Admin_0-1634626611002.png

In some cases you can be faced with users’ requirement for changing the ‘Grand Total’ label to a more meaningful title (name of main category which summarizes some sub-category figures such as ‘World Wide’, ‘Sales Department’ which summarizes average wins per sales person).

To apply it please follow the steps below:

Implementation steps

  1. Go to the widget menu on its edit mode and click on Edit Script
Community_Admin_1-1634626611013.png
  1. Copy the script attached at the end of this post to the script tab.
  2. Change the marked text to your desired one.

 

Community_Admin_2-1634626610901.png

 

Community_Admin_3-1634626610927.png
  1. Save the script.
  2. Close the script tab.
  3. Refresh the widget tab in its edit mode. You should already see the change here.

 

Community_Admin_4-1634626610970.png
  1. Click on the Apply button.
  2. Enjoy your new title

Another option is to have the title of one of the rows as the total label (need to change the marked number according the row location in the table-1):

 

Community_Admin_5-1634626610925.png

 

Community_Admin_6-1634626610985.png

 

Community_Admin_7-1634626610993.png

 

Community_Admin_8-1634626611000.png

The same procedure as described above fits this option as well.

Comments
lorij
7 - Data Storage
7 - Data Storage

Is there a Linux version for this ? 

OlehChudiiovych
Sisense Team Member
Sisense Team Member

Linux version is using Pivot2 which is different widget and has its own API. 

Looks like the script should be made from scratch using syntax described here:

https://sisense.dev/reference/js/widget/pivot2.html

Laris_Fdz
8 - Cloud Apps
8 - Cloud Apps

pivot2 version

widget.transformPivot(
{type: ['grandtotal']},
function (metadata, cell) {
if(cell.content == 'The title to be changed') {
cell.content = 'The new title';
}});

P.S. And I am looking for a way to move Grand Total to the first row. Has anyone achieved it?

Version history
Last update:
‎02-05-2024 12:24 PM
Updated by:
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: