Running Total in repoting

USEFUL: Add running totals to enhance web reporting

In today’s blog post I want to tell you how to get more from Flexmonster pivot with the help of running totals. To begin with, I’ll tell you what is it - running totals. This is one of the aggregations available for CSV, JSON, FDS databases, MongoDB, MS Analysis Services, and even custom data source APIs. Imagine a list of numbers. A running total keeps track of the sum of these numbers as you go down the list, adding each new number and subtracting any that are removed.

To demonstrate how this aggregation works, I suggest you have a look at the following table:

Quarter Total Sum of Revenue Running Totals of Revenue
Q1 $3,600 $3,600
Q2 $4,800 $8,400
Q3 $5,100 $13,500
Q4 $6,400 $19,900

The first column contains quarters, the second column - total revenue for each position. In the third column, we have running totals. In case of Q1, running total equals total sum of revenue for Q1, which is $3,600. For Q2, we add total sum of revenue for Q2 to the previous value ($4,800 + $3,600 = $8,400). This simple example explains the gist of running totals. Such aggregation is a convenient alternative to familiar sum.

In Flexmonster pivot you can set running totals in two ways:

via UI: click the sigma icon next to the value name in Field List and choose the type of Running totals you want to apply. There are two options: 

  • Running totals of column that calculates running totals from left to right 
  • Running totals of row that calculates running totals from top to bottom.

via report: specify the type of running totals you want to apply for the necessary measure in the slice. There are two options: 

  • "aggregation": "runningtotalsofcolumn"

  • "aggregation": "runningtotalsofrow".

I hope you will find running totals useful for your reporting! You can also check out all the aggregation options our pivot grid supports.

Subscribe to our news: