Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

evaluate an expression only when is "expand all"

Hello,

I am a newbie in Qlik.

I have a pivot table with a column that calculates a % between current row-column1 and above row-column1.

My problem is that I want to evaluate that expression only when the user expands all dimensions, I mean the last level

(because if the pivot table is collapsed all, the comparison is meaningless).

The expression is like this:

(

sum( if(YEARDATE<= v_maxYear, netfat, 0))

-

above(sum( if(YEARDATE <= v_maxYear, netfat, 0)))

)

/

above(sum( if(YEARDATE <= v_maxYear, netfat, 0)))

Is there a way to know if we are in the last level (with "expand all")?

Thanks!

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Sort of.  There's a dimensionality() function that basically tells you how many dimensions are displayed at the left, and a secondarydimensionality() function that tells you how many dimensions are displayed at the top.  That won't tell you if the whole chart is fully expanded, but for any given cell, you could see if that cell is being displayed at the lowest possible level.  Like if you have five dimensions, if dimensionality() + secondarydimensionality() = 5, you're at the lowest level of detail for that cell, so then it might be appropriate to do your calculation.

View solution in original post

2 Replies
johnw
Champion III
Champion III

Sort of.  There's a dimensionality() function that basically tells you how many dimensions are displayed at the left, and a secondarydimensionality() function that tells you how many dimensions are displayed at the top.  That won't tell you if the whole chart is fully expanded, but for any given cell, you could see if that cell is being displayed at the lowest possible level.  Like if you have five dimensions, if dimensionality() + secondarydimensionality() = 5, you're at the lowest level of detail for that cell, so then it might be appropriate to do your calculation.

Not applicable
Author

Thank you very much, this solved my problem!