Trexion Kameha
Trexion Kameha

Reputation: 3580

Tableau: Cumulative Change Chart from Daily Changes

I have data that contains date and percent change [chg] in my data.

I would like to create a chart that is a cumulative change, which means (1+chg) * previous value.

In order to accomplish this, I use the following:

   if  
   INDEX()=1 then 1
   ELSE (1+sum([chg]))*PREVIOUS_VALUE(1)
   END

The problem with this format is that it cuts off the first day's data.

Is there a way for me to include the first day's data?

Thank you.

Upvotes: 0

Views: 385

Answers (1)

Alex Blakemore
Alex Blakemore

Reputation: 11921

(1+sum([chg]))*PREVIOUS_VALUE(1) 

Upvotes: 1

Related Questions