3 Replies Latest reply on Jun 30, 2017 4:54 AM by mendey Sai Branched to a new discussion.

# cumulative sum

Hello Team,

Is it possible to get this calculation it looks like cumulative sum but to i cant able to achieve this i have tried to take the cumulative sum but i am not gettign zero in the first cell

 \$165,424 \$173,695 \$191,064 \$219,724 \$263,669 \$0 \$173,695 \$364,759 \$584,483 \$848,152

First row data is the source data i need to get the second row data

ex : 0+173695=173695

173695+173695=364759

• ###### 1. Re: cumulative sum

Running_sum(SUM(measure)) should do

• ###### 2. Re: cumulative sum

Hi Mendey,

You can use Previous_Value to calculate the running sum and use IF statement to make the first row zero.

Step 1: Create calculated field [Cumulative Sum]

IF FIRST() == 0 THEN 0

ELSE PREVIOUS_VALUE(0) + SUM([Value])

END

Step 2: Create your view. Right click on [Cumulative Sum] and select Compute using "Table (Down)"

Hope this helps.

Ossai • ###### 3. Re: cumulative sum

when i do a calculation like this(1-(A/B) i need to get the value 35.42 where  i am getting a value like 8.98 what i observed is when i change it to dimension it is working fine but my concern here is i need to add suffix to the number.

Can anyone please suggest me the solution.