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

    Mohit Aggarwal

      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

      output/business activity : measureid =6

      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+

      CASE ATTR([MeasureID])WHEN 6 THEN  (100-[CF_PMIUnadjustedFigure])*0.15

      END

      )

       

      please help me in this scenario