# Can you do a running total in a pivot table?

Member

I have some data that I'm trying to run in a pivot table. I've got it laid out the way I need it, but I would like to see a running total. This is what I have currently,

If you look at the 0ME unit, it should read 96.77% | 96.77%| 97.23% | 97.23% | 100.00%

This is easy to do in a graph with a running total, but I can't find a way to make it work with a table. Thanks in advance for your help.

@randall_white there is a feature in Domo tables to display as running total in the ‘Show Values As' menu of a column. I have tested this out in Pivot Tables, and it seems to work vertically, but not horizontally..

For example, my pivot table below will sum up revenue in running total for all rows in September column…but it doesn't roll up horizontally across columns from Sept/Oct. This feature may be a solution in some cases, but not all.

The solution I found to sum up across columns….is using a window function beastmode, for example, if I want to sum the revenue column across time.

I plug that beastmode into my values column and can see that it's totalling up across columns, but not grouping how I want, which indicates I need to add a PARTITION BY clause to the grouping elements in the pivot rows

Let's update that formula

And visualize the result, which is looking much better because it's grouping the running totals by the row groupings in my chart (department,sales_rep) and ordering it by date.

Jacob Folsom
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"

@randall_white more specifically to your data, I believe you need a new formula for received/ordered that calcs the running totals by unit ordered by date…something like this:

SUM(SUM(received)) OVER (PARTITION BY UnitNumber ORDER BY Date) /

SUM(SUM(ordered)) OVER (PARTITION BY UnitNumber ORDER BY Date)

Jacob Folsom
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"