3 Replies Latest reply: Apr 5, 2018 2:59 AM by Chanty 4u

# Aggregation if elsif statement

Hello,

I need to use a conditional statment to group in intervals.

So I used this function

Aggr(

If(X=0, '0',

If(X>0 and X<10000,  '0<CA<10K',

If(X>=10000 and X<200000,  '10k=<CA<20k',

If(X>=20000 and X<50000,   '20k=<CA<50k',

If(X>=50000 and X<70000,   '50k=<CA<70k',

If(X>=70000 and X<100000,  '70k=<CA<100k',

If(X>=100000 and X<150000, '100k=<CA<150k',

If(X>=150000 and X<200000, '150k=<CA<200k',

if(X>=200000, '200k=<CA '

))))))))))

I got an error in the expression.

I think it is a problem with the agregation.

Regards

• ###### Re: Aggregation if elsif statement

aggr with dimension need

Aggr(

If(X=0, '0',

If(X>0 and X<10000,  '0<CA<10K',

If(X>=10000 and X<200000,  '10k=<CA<20k',

If(X>=20000 and X<50000,   '20k=<CA<50k',

If(X>=50000 and X<70000,   '50k=<CA<70k',

If(X>=70000 and X<100000,  '70k=<CA<100k',

If(X>=100000 and X<150000, '100k=<CA<150k',

If(X>=150000 and X<200000, '150k=<CA<200k',

if(X>=200000, '200k=<CA '

))))))))),Dim1,Dim2)