cancel
Showing results for 
Search instead for 
Did you mean: 

How to write case in graphical calculation view using numbers ?

ding_ye
Explorer
0 Kudos

Hi Experts,

The field CC_DAYS of graphical calculation view is type of integer, for example 100.

Now I want to create a new calculation column CLASS of graphical view using case with logic of

0 < CC_DAYS <= 300, CLASS = A

301 < CC_DAYS <= 600, CLASS = B

CC_DAYS > 600, CLASS = C

How to write such case statement.

View Entire Topic
fedaros
Advisor
Advisor
0 Kudos

Hi ding.ye,

Case is for exact matches like to process if 1 then A... if 2 then B else Z.... case(field,1,'A',2,'B','z')... So it's not for your scenario.

You can do if function:

if("CC_DAYS"<=300,'A',
if("CC_DAYS"<=600,'B',
'C'))

I wrote in 3 lines for better readability which is informant to understand the logic when you may have many conditions.

Regards, Fernando Da Rós
ding_ye
Explorer
0 Kudos

Thank you very much.