# Qlik Sense App Development

Contributor II

## If(dimensionality () = 0 & 1 ?

Hi everybody

i have a PIVOT TAB like this

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

## 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

## 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

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

Contributor II

Hi Jonathan