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”
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
Go to the widget menu on its edit mode and click on Edit Script
Copy the script attached at the end of this post to the script tab.
Change the marked text to your desired one.
Save the script.
Close the script tab.
Refresh the widget tab in its edit mode. You should already see the change here.
Click on the Apply button.
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):
The same procedure as described above fits this option as well.
****For Linux****
You may use this script for Pivot2 on Linux,
widget.transformPivot(
{type: ['grandtotal']},
function (metadata, cell) {
if(cell.content == 'The title to be changed') {
cell.content = 'The new title';
}});
It is important to note, the provided solution is not an official feature and is not supported or goes through the proper product life cycle.
This will require maintenance and proper testing on your side, we also highly recommend running on a staging environment before upgrading or implementing it on production environments.
By
Community_Admin
Posted 4 years ago·Last reply 4 years ago
3 comments
Laris_Fdz
·4 years ago
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?
OlehChudiiovych
·4 years ago
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:
Laris_Fdz
·4 years agopivot2 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?
OlehChudiiovych
·4 years agoLinux 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
lorij
·4 years agoIs there a Linux version for this ?