2 Replies Latest reply on Sep 24, 2018 7:53 AM by Mohit Aggarwal

# how to calculate values using multiple checks in case/if statement

Hi,

Can anybody help me I am stuck in one situation

scenario :

I have to create the calculated field in which I need to add  the values coming from multiple measure(Snapshot attached).

value denotes :

incoming new business  :  measureID =1

level of employment :  measureid =2

stocks of purchanses  : measureid = 7

supplier delivery times: measureid = 9

formula to calculate the value :

(CF_PMIUnadjustedFigure for 1 * 0.3) + (CF_PMIUnadjustedFigure for 2 * 0.15) + (CF_PMIUnadjustedFigure for 6 * 10)+ (CF_PMIUnadjustedFigure for 7 * 0.15) + (CF_PMIUnadjustedFigure for 9 * 10).

I tried to use case statement but it does't work

(CASE ATTR([MeasureID]) WHEN 2  THEN [CF_PMIUnadjustedFigure]*0.3 END +

CASE ATTR([MeasureID])WHEN 7 THEN  [CF_PMIUnadjustedFigure]*0.1 END +

CASE ATTR([MeasureID])WHEN 1 THEN  [CF_PMIUnadjustedFigure]*0.1  END+

CASE ATTR([MeasureID])WHEN 9 THEN  [CF_PMIUnadjustedFigure]*0.2 end+

END

)

• ###### 1. Re: how to calculate values using multiple checks in case/if statement

Hi Mohit,

Could you please attach the workbook?

• ###### 2. Re: how to calculate values using multiple checks in case/if statement

Hi Meenu,

to attach the workbook bit difficult, as it's having a confidential data. I have attached the snapshot of my workbook.

if this snapshot will not help then i try to attach the workbook.