Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
innashna
Contributor II
Contributor II

Totals in Pivot Chart show wrong sums

Hi,

I have a Pivot Report where the Totals not correct.

For example, for PTD Date 07/13/2020 we see for differnet names -Total Orders 13 and Total Orders 19, but in Totals we see '-' instead of 32. Can you  please help- the report is attached.

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

can you try this

Count({<flag_cease_cancel_orders={0}>}DISTINCT DD_Solution_Leg_ID)

or

=sum(aggr(if(flag_cease_cancel_orders=0,Count(DISTINCT DD_Solution_Leg_ID)), Dimension1,Dimension2))

where Dimension1,Dimension2 are pivot table dimension, you need to include all dimensions of pivot table

View solution in original post

4 Replies
Kushal_Chawda

What is the expressions used? May be in expression you have applied aggr function but did not apply relevant aggregation function on top of that.

innashna
Contributor II
Contributor II
Author

Hi,
This is the expression for total orders:
=if(flag_cease_cancel_orders=0,Count(DISTINCT DD_Solution_Leg_ID))

This is presentation tab:
[cid:image001.jpg@01D65ABE.5B6CC770]
innashna
Contributor II
Contributor II
Author

This is the presentation tab. - attached

Kushal_Chawda

can you try this

Count({<flag_cease_cancel_orders={0}>}DISTINCT DD_Solution_Leg_ID)

or

=sum(aggr(if(flag_cease_cancel_orders=0,Count(DISTINCT DD_Solution_Leg_ID)), Dimension1,Dimension2))

where Dimension1,Dimension2 are pivot table dimension, you need to include all dimensions of pivot table