Changing the ‘Grand Total’ label on pivot table
*****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”
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.