Skip to Content
0
Former Member
Jul 26, 2016 at 10:04 PM

Nested if in Calculated Column - Graphical Calc View

756 Views

Hi All,

I have a nested condition )case with in if as below) that I want to do it in a calculated column, I am not sure how else it can be done, any ideas? the case statement does not work for this scenario.

nested If below

IF AREA IS INITIAL.

CASE QUESTION.

WHEN '0001'.

bukrs = "SSS".

WHEN '0002'.

bukrs = "PPP".

WHEN '0003'.

bukrs = "QQQ".

WHEN '0004'.

bukrs = "TTT".

WHEN '0005'.

bukrs = "RRR".

ENDCASE.

ELSE.

bukrs = AREA

ENDIF.

And my Hana condition column is as below

if(isNull("AREA") or "AREA" = ' ',

if("QUESTION = '0001','SSS',

(if("QUESTION" = '0002','PPP',

(if("QUESTION" = '0003','QQQ',

(if("QUESTION" = '0004','TTT',

(if("QUESTION"='0005','RRR',"AREA"))

))

))

))

) ,"AREA" )

Thanks,

Arthur.