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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

problem with partial sums on pivot table

Hi qlikview community,

I am having a proble with the partial sum on my pivot table. The partial sum is diffrent from the sum of rows in my chart. I display my expression above:

if( b.Year < SubField(vTODAY,'-',1),sum(b.NetSalesValue),if(b.Month < SubField(vTODAY,'-',2),sum(b.NetSalesValue),sum((aggr(sum(b.ForecastQty),b.CustomerClassDescription,b.ProductClassDescription,b.CustomerName,b.YearMonth) * Price) / ExchangeRate)))

My dimensions are: b.CustomerClassDescription,b.ProductClassDescription,b.CustomerName,b.YearMonth

I recon that this is because of the aggregation somehow . Any ideas ho to fix that???

Regards

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

I manage to reproduce the correct parial sums by altering my expressions similar to the above:

sum(if( b.Year < SubField(vTODAY,'-',1),b.QtyInvoiced,if(b.Month < SubField(vTODAY,'-',2),b.QtyInvoiced,b.ForecastQty)))

View solution in original post

2 Replies
Not applicable
Author

I get the same thing with my quantity expression too eventhough i dont use aggr....

=if( b.Year < SubField(vTODAY,'-',1),sum(b.QtyInvoiced),if(b.Month < SubField(vTODAY,'-',2),sum(b.QtyInvoiced),sum(b.ForecastQty)))

Anyone that can help....

Not applicable
Author

I manage to reproduce the correct parial sums by altering my expressions similar to the above:

sum(if( b.Year < SubField(vTODAY,'-',1),b.QtyInvoiced,if(b.Month < SubField(vTODAY,'-',2),b.QtyInvoiced,b.ForecastQty)))