Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

philgood34
Contributor 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
MVP
MVP

Re: If(dimensionality () = 0 & 1 ?

>>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, .....)

3 Replies
MVP
MVP

Re: If(dimensionality () = 0 & 1 ?

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,

MVP
MVP

Re: If(dimensionality () = 0 & 1 ?

>>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, .....)

philgood34
Contributor II

Re: If(dimensionality () = 0 & 1 ?

Hi Jonathan

thank you for your explanations

in my case

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


is  all right !


regards


Philippe