Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Edyta
Contributor III
Contributor III

Grand total in pivot table

Hi guys,

I have simple pivot table with dimensions index and item name, and the measure is quantity in kg.

I need to show in table grand total for the measure, I used the formula:

sum(aggr(Sum([[quantity in kg]]])*-1,index)). And it still does not show the total. Could you please assist on this issue?

 

Thanks in advance

Labels (1)
1 Solution

Accepted Solutions
anushree1
Specialist II
Specialist II

HI ,

I meant one set of square braces is enough, as your posted expression had multiple square braces , anyways please use :

sum(aggr(Sum([quantity in kg])*-1,index))

And in the right panel select the first dimension.  Turn on "Show Totals".

View solution in original post

4 Replies
sasiparupudi1
Master III
Master III

sum(

aggr(

Sum([quantity in kg])*-1

,index)

)

anushree1
Specialist II
Specialist II

why have you used so many square braces here:Sum([[quantity in kg]]])

 use the same exp like sum(aggr(Sum([quantity in kg])*-1,index))

Edyta
Contributor III
Contributor III
Author

If I remove square braces, it shows the fomula is incorrect. The name of column is [quantity in kg]

I have changed it to  sum(aggr(Sum("[quantity in kg]")*-1,index)) and it still does now show the grand total at the end of pivot table.  I also used your formula and it does not show grand total at the end of pivot table.

anushree1
Specialist II
Specialist II

HI ,

I meant one set of square braces is enough, as your posted expression had multiple square braces , anyways please use :

sum(aggr(Sum([quantity in kg])*-1,index))

And in the right panel select the first dimension.  Turn on "Show Totals".