Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IF statement to categorize..

Hi,

i'm trying to categorize the using an If statement.

IF (Amount <= 200,'<=500',IF(Amount >500<1001,'501-1000',IF(Amount >1000>2000'1001-2000',null()) )) as AmountSize;

Please help .Thanks

1 Solution

Accepted Solutions
billbois
Creator
Creator

I'm unable to test this at the moment, but I think it would be something like this:

IF (Amount <= 200, '<=500',

    IF(Amount >500 AND Amount <1001, '501-1000',

    IF(Amount >1000 AND Amount <2000, '1001-2000',

    null()))) as AmountSize;

Hope this comes close.

View solution in original post

4 Replies
billbois
Creator
Creator

I'm unable to test this at the moment, but I think it would be something like this:

IF (Amount <= 200, '<=500',

    IF(Amount >500 AND Amount <1001, '501-1000',

    IF(Amount >1000 AND Amount <2000, '1001-2000',

    null()))) as AmountSize;

Hope this comes close.

MayilVahanan

HI

IF (Amount <= 500, '<=500',

    IF(Amount >500 AND Amount <1001, '501-1000',

    IF(Amount <2000, '1001-2000',null()))) as AmountSize;

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

script line error

Anonymous
Not applicable
Author

sorry it worked,i had the same script in a different tab ,that's why i had the error

Thank you both