Exploratory Community

How to calculate cumulative products

#1

Suppose you have data like below

And you want to create a new column E with the below Excel-style formula:

E1 = D1 * 100
E2 = E1 * D2
E3 = E2 * D3

So here is how you can do it with Create Calculation in Exploratory

100 * cumprod(D)

So basically, it creates a new column E with the expression 100 * cumprod(D)

cumprod is a function that returns the cumulative products.