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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
philgood34
Creator II
Creator II

If(dimensionality () = 0 & 1 ?

Hi everybody

i have a PIVOT TAB like this

PIVOT.png

I created Aggr expressions with ratios and i use IF( dimensionality () for TOTAL and SUBTOTAL calculations like this

If(Dimensionality() = 0,

Sum(Aggr( .....

If(Dimensionality() = 1,

Sum(Aggr(....,

it's working perfectly, but i think it's a too complicated syntax

Is there a syntax that alows me to write only one time the expression (as the fonction "OR" in excel) ?

like this :

If(Dimensionality() = 0, OR 1,

Sum ( Aggr( ...

Regards

Philippe

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

>>Is there a syntax that alows me to write only one time the expression (as the fonction "OR" in excel) ?

If(Dimensionality() = 0 Or Dimensionality() = 1, .....)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

If the aggr() includes all the chart dimensions, then you would not need a separate logic for the subtotals and totals, so you would not need the Dimensionality() split. Unless, of course, you need different logic, like and Average at the totalling levels and a sum at the detail levels,

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

>>Is there a syntax that alows me to write only one time the expression (as the fonction "OR" in excel) ?

If(Dimensionality() = 0 Or Dimensionality() = 1, .....)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
philgood34
Creator II
Creator II
Author

Hi Jonathan

thank you for your explanations

in my case

If(Dimensionality() = 0 Or Dimensionality() = 1


is  all right !


regards


Philippe