Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

PIVOT TABLE SUBTOTALS

HI

In the Pivot table attached above the subtotal of the column by year does not sum to the correct number. for example in 2015  numbers I get 337, but the total at the bottom displayed is 304.


Is their a way to take the subtotals in expression.


Don't know the reason have taken partial sums in pivot table for charge description.


Please help me to do.


Thanks,

7 Replies
sunny_talwar

What is your expression?

May be use this:

Sum(Aggr(<YourExpression>, <YourDimensions>))

bhavvibudagam
Creator II
Creator II
Author

Hi,

I have taken pivot table with 2dimesntions charge_Description and year one expression

=Count({<ARCHRG.UCR_CODE={'90D','90E','90G'},AGE={"<21"}>}distinct ARMAINID)

bhavvibudagam
Creator II
Creator II
Author

not working above one can i include both dimensions

sunny_talwar

So this isn't working?

=Sum(Aggr(Count({<ARCHRG.UCR_CODE={'90D','90E','90G'},AGE={"<21"}>}distinct ARMAINID), charge_Description, Year))

bhavvibudagam
Creator II
Creator II
Author

Not working showing zeros .

I need the subtotal the bottom one mentioned in red mark in the above attached image

sunny_talwar

Would you be able to share a sample?

bhavvibudagam
Creator II
Creator II
Author

its in server unable to upload.

The issue is in the attached pivot table image at the subtotal for example for the year 2015 the count is 337 but getting 304.

the expression used is

=Count({<ARCHRG.UCR_CODE={'90D','90E','90G'},AGE={"<21"}>}distinct ARMAINID)

dimensions charge_Description,year