Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Valued Contributor II

Total in Pivot Table...

Hi Guys,

i have a pivot table with two dimensions and one expression.

see the sample image.

desk.png

i have more than 50 brands, in a list box, let say i selected 4 brands, now the partial sum(Total) is for selected 4 brands only,


but i want to show the whole sum(Total) for all brands. or if i could show an other row as 'Others' then the partial sum can be correct.

but i dont know ,how to do it...The total row must be for all brands, does matter whatever is selected in brands...


Many Thanks..



1 Solution

Accepted Solutions
Highlighted

Re: Total in Pivot Table...

Try this:

If(Dimensionality() = 0, Sum({1} Sales), Sum(Sales)) //Replace Sum(Sales with your expression, just add {1} to the true condition.

Attaching a sample with dummy data. Hope that helps.

Best,

Sunny

View solution in original post

3 Replies
Highlighted

Re: Total in Pivot Table...

Try this:

If(Dimensionality() = 0, Sum({1} Sales), Sum(Sales)) //Replace Sum(Sales with your expression, just add {1} to the true condition.

Attaching a sample with dummy data. Hope that helps.

Best,

Sunny

View solution in original post

Highlighted
Valued Contributor II

Re: Total in Pivot Table...

worked...

Many thanks..

little confuse about the expression, can you please elaborate a bit.

i think in my case, Dimensionality() will be 1 all the time?

and i have read that , the dimensionality start from 1 to upward.

when it can be zero?

many thanks...

Highlighted

Re: Total in Pivot Table...

Add an expression: Dimensionality() and SecondaryDimensionality() in your existing chart and you will know which sub-total has what Dimensionality() and SecondaryDimensionality(). This you can then refer in your main expression based on which combinations needs to do what. SecondaryDimensionality() is only used in a pivot table (but I thought I will explain its use as well)

Capture.PNG

I hope this will help. For more info on Dimensionality you can check the info by Robert_Mika‌: How to use - Dimensionality()

HTH

Best,

Sunny