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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Pivot Table - Dynamic Total Column

Hello All,

Is there any way, by which I can have total column in Pivot  table based on some condition.

eg. If I am having dimension as MonthName as one of the dimension on which I have checked the partial sum check box. Then I want to get total of only selective columns, say Jan,Feb,Mar for that matter.

Thanks In Advance

1 Solution

Accepted Solutions
Kushal_Chawda

Yes. It's possible. Use Dimesionality() or secondarydimensionality() functions. see this below

Custom total calculation in Pivot table

View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Yes, that's possible. You can use the dimensionality() function to check which level you're at and use this to calculate different expressions: if(dimensionality()=0, sum({<Month={'Jan','Feb','Mar'}>}Amount), sum(Amount)). If your month dimension is displayed as columns you use the secondarydimensionality() function instead.


talk is cheap, supply exceeds demand
Kushal_Chawda

Yes. It's possible. Use Dimesionality() or secondarydimensionality() functions. see this below

Custom total calculation in Pivot table

Not applicable
Author

Thanks a lot for your quick reply.

I am a bit confused regarding the functionality of dimensionality() or secondary dimensionality().

Will you please elaborate this, so that I will have a better understanding of the same.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Dimensionality() is for dimensions shown as rows. SecondaryDimensionality() is for dimensions pivoted to columns.


talk is cheap, supply exceeds demand