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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
JonathanKelly
Contributor III
Contributor III

Pivot Table Total

I have a pivot table that counts the Areas in the columns and various calculations in the rows. One of these calculates a cost, however this is dependent on the area. I use the formula below to calculate this;

if([Area]='Wales',(Count(if([Received Date]>='$(vMonthStart)' and [Received Date]<='$(vMonthEnd)',[Received Date]))*50),

if([Area]='Scotland',(Count(if([Received Date]>='$(vMonthStart)' and [Received Date]<='$(vMonthEnd)',[Received Date]))*50),
(Count(if([Received Date]>='$(vMonthStart)' and [Received Date]<='$(vMonthEnd)',[Received Date]))*100)))

This works as intended with the individual areas however when I add the Total column using the inbuilt show totals function

JonathanKelly_0-1664282594601.png

The total auto calculates as if everything is multiplied by 100 rather than just a sum of all the columns. 

Labels (4)
1 Solution

Accepted Solutions
JonathanKelly
Contributor III
Contributor III
Author

Sum(aggr( sorted it.

View solution in original post

1 Reply
JonathanKelly
Contributor III
Contributor III
Author

Sum(aggr( sorted it.