Skip to main content

 

ThoughtSpot

Calculate the cumulative sum

Overview

Explains what the feature is or what its benefits are to the user or customer.

Feature

You can use the cumulative function in a search to measure from the start of your data to the current point.

This example will demonstrate using the cumulative_sum formula, also known as a running total. To use the cumulative function in a search:
  1. Start a new search.

    Figure: Aggregation Answer example

  2. In the upper right hand side of the table, click Actions and select Add formula.

    Figure: Create a new formula in an answer

  3. Enter the cumulative_sum formula, providing a measure and one or more attributes. The example will return the sum of revenue, accumulated by the commit date.

    Figure: Cumulative Sum Formula

  4. Name the formula by clicking on its title and typing the new name. Click Save.
  5. The formula will appear in the search bar and in the table as its own column.

    Figure: Cumulative Sum Table

    A headline box displaying the cumulative sum within the entire table will appear at the bottom. You can click on it to toggle between different aggregations.

  • Was this article helpful?