/ Cumulative Formulas

Cumulative Formulas

Cumulative formulas are aggregate formulas that allow you to calculate the average, max, min, or sum of your data over time, optionally grouped by an attribute (like region or department). Although we usually talk about cumulative formulas over time, you could use them over any other sequential data.

In this video, we will use a cumulative sum formula, also known as a running total, to find the growing sum of your revenue over time.

In your search, click the Add Formula icon. You can use the Formula Assistant to view syntax and usage examples.

Enter a cumulative sum formula with a measure and one or more attributes. The formula will return the sum of the measure, which in our case is revenue. The attributes are the ordering columns used to accumulate the sum. Here we have decided to order the data by date.

Click Save to apply your formula. You can edit your formula later by clicking the edit icon next to it, or delete it by clicking the x.

Sort your Date column. So you can see here that the formula provides the total sum of the revenue at each listed interval of the date. So the cumulative sum starts at around 37 thousand at the first order date, and grows to over eight million at the last order date, with the intermediate sums reported in-between.

Also, changing the date bucketing will adjust the formula column accordingly. Look what happens when we change it from Monthly to Quarterly.