Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pivot Table

Hello there,

I got help last time to build a total on a pivot table. Now I need more help to make the sum of the totals. On the attachment there is an example.

This is the expression for the total on the Class level.

How can I have the Total on the Category level?

The result of both totals must be 21600+29700=51300

Thanks in advance.

1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like this

=if(rowno()=0 or IsNull(RowNo()),SUM(AGGR((sum(Amount)-(Value*max(total<Category>aggr(SUM(Amount),Category,Class,Code))/1000))*Price,Type,Category,Class,Code)),Column(6)*Column(7))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi

Try like this

=if(rowno()=0 or IsNull(RowNo()),SUM(AGGR((sum(Amount)-(Value*max(total<Category>aggr(SUM(Amount),Category,Class,Code))/1000))*Price,Type,Category,Class,Code)),Column(6)*Column(7))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Thanks Mayil

It works nice!