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: 
Anonymous
Not applicable

How to count number of dimensions on a pivot table

Hi everyone,

I have a pivot table, listing sizes and stores for each size that sold out.

the pivot table is attached to this discussion.

basically all I wish to do is to count the number of stores for each size.

this subtotals must be shown at the top of the store dimension for each size.

partial sum doesnt seem to work in this regard?

thanks everyone

3 Replies
sunny_talwar

Subtotal might work if you use this expression for stock quantity:

If(Dimensionality()= 1, Aggr(Count(Stores), Size), yourCurrentExpression)

HTH

Best,

Sunny

jpenuliar
Partner - Specialist III
Partner - Specialist III

you can look into Dimensionality():

How to use - Dimensionality()

you can also search for Alternate Pivot Total by Rob Wunderlich

sunny_talwar

You don't even need Aggr I guess, simple count is also working:

If(Dimensionality()= 1, Count(Stores), yourCurrentExpression)


Also find attached an example.


Best,

Sunny