Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rajatsingh_40
Contributor II
Contributor II

Pivot table total not working correctly

Hi Guys,

I am working on  ageing report, where I have created 3 input boxes to get the bucket values by the user and they have by default values.
so I created a Pivot Table like this,

 
 

12..PNG

 the problem is that the total function does not adds the column values correctly, as you can see for bucket 50-120 days and 120>days columns.
however its working fine when i convert it to straight table.
please help me in this. 


I am using this expression for last column i.e 120>days,

"if(Sum(Aggr(sum( {<duedays = {">=$(Vbucket3)"}>} DebitAmount ),[region]))+sum(Aggr(sum([CreditAmount]),[region]))>=0,
Sum(Aggr(sum( {<duedays = {">=$(Vbucket3)"}>} DebitAmount ),[region]))+sum(Aggr(sum([CreditAmount]),[region]))
,0)"

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

4 Replies
sunny_talwar

This might be challenging because you are using a calculated dimension... if it was a simple dimension... you could have used Sum(Aggr(YourExpression, YourDimensions)), but because it is using a calculated dimension in the chart, you cannot add this to Aggr() function's dimension....

Would you be able to share a sample where we can look at this and try out few things?

rajatsingh_40
Contributor II
Contributor II
Author

Hi,
I am attaching the test_delete.qvf with sample data.

sunny_talwar

Check attached

image.png

rajatsingh_40
Contributor II
Contributor II
Author

Thank you for your help Sunny, Aggr() really helped me in the report.