Skip to Content
0
Former Member
Jul 07, 2016 at 03:52 PM

Conditional summation - If in Calculated column

610 Views

Hi All,

I have a need to add values based on input month. The scenario is as below.

Month Value

01 V1

02 V2

03 V3

04 V4

05 V5

06 V6

07 V7

08 V8

09 V9

10 V10

11 V11

12 V12

Based on the month value I need to sum upto that month value. I have used the IF condition but the result does not seem to be right. Let me know whether this logic will do my need.

if('$$Month$$' = '01',V1,

if('$$Month$$' = '02', (V1+V2),

if('$$Month$$' = '03', (V1+V2+V3),

if('$$Month$$' = '04', (V1+V2+V3+V4),0

) -- 04

) --3

) --2

) --1

this is extended up to 12 months. But the result does not seem to be correct , any idea?

Thanks

Arthur.