Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there a way to find out if a chart dimention is expanded or collapsed?

Hello Qlikview Experts,

I'm having an issue with a pivot table that has 4 dimensions on top and 5 dimensions on left. To build a complex table structure and maintain performance, the table structure is driven by data and the same data set is repeated 3 times to drive the structure and calculate different totals (which is ultimately causing this issue). The table works well, showing totals correctly, and the performance is not an issue, however when the highest level of detail is collapsed (dim 2), the totals are doubled, which is expected, but not desired.

Is there a way to check if a given dimension is expended or collapsed and based on that apply a filter or divide grand total by 2, or do something else to prevent that?

pic1.png

pic2.png

Your help is greatly appreciated!

Thanks in advance!

Igor

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Igor,

Sorry, I cannot guess without trying myself.

But the good news, I've figured out something about collapse/expand condition.  To try, create expression dimensionality(), and see what it returns when you collapse and expand your dimensions.  Very possible you can use it as condition.
Given the stricter of your table, you maybe need to try also secondarydimensionality().

Regards,

Michael


View solution in original post

6 Replies
Anonymous
Not applicable
Author

I can't think of any.

But I'm sure it is possible to figure out an expression which takes care of total.  Most likely it should use aggr(), e.g.

sum(aggr(<your current expression>, <some dimensions here>))

Not applicable
Author

Hi Michael,

Thanks for your reply!

I tried using it, however it did not produce same totals i have with sum() in my expression. Unless I did not do it right as have never used aggr() before. Should it go into existing expression, or should I create a new dimension/expression for this? Would it not have the same issue if Partial Sum (Subtotals) enabled? I need totals on the top for each dimention i have.

Thanks,

Igor

Anonymous
Not applicable
Author

Igor,

Sorry, I cannot guess without trying myself.

But the good news, I've figured out something about collapse/expand condition.  To try, create expression dimensionality(), and see what it returns when you collapse and expand your dimensions.  Very possible you can use it as condition.
Given the stricter of your table, you maybe need to try also secondarydimensionality().

Regards,

Michael


Not applicable
Author

Michael,

Thank you so much!!!

SecondaryDimensionality() function was the answer to my issue.

Thanks and regards,

Igor.

Anonymous
Not applicable
Author

I can't believe I've typed stricter instead of structure

Not applicable
Author

It's ok, I understood what you meant