Running Total Analytic Function

This article describes how to use the Running Total analytic function in Arcadia Enterprise.

We are using the Basic Visual for Aggregates to demonstrate how to use the Running Total analytic function.

  1. Click the field on the measurement shelf, in this case, the sum(population) field on the Y Axis shelf.
  2. In the Field Properties menu, expand Analytic Functions, and select Running Total.
    Applying Dense Rank
  3. In the Analytic Function: Running Total modal window,

    1. In Select aggregate for this measure, leave the default Sum. The other aggregation options are Count, Minimum, Maximum, and Average. In addition, some connection types also support Approximate Distinct Count and Exact Distinct Count.
    2. Under Select entities over which to calculate running totals, select year. This is the grouping that applies when calculating the running total.
    3. Under Select the sort order, you can specify the order of sorting. This order specifies what the row is, and the row where the value is taken. If your visual already specifies sorting order, these values appear in the modal.

      You can add additional sort parameters, by clicking the (add/plus) icon.

      Here, leave the default order: year ascending, followed by country ascending.

    defining the Running Total analytic Function
    Analytic Function: Running Total
  4. Click Apply.
  5. [Optional] If you examine the expression in the Enter/Edit Expression interface, it shows that the function has the following form:

    sum(sum([population])) over (partition by [year] order by [year], [country] 
      rows between unbounded preceding and current row) as 'running total(population)'
  6. Click Refresh Visual.

  7. Notice the change to the appearance of the visual, and the change in values that appear on the tooltip.

    Running Total Analytic Function Visual
    Running Total Analytic Function Visual