Pivot Table Running Total Options

I am trying to display a dataset showing adds and losses by month over time. The end result would ideally look like this

I want the bottom “Total” section to display a running total rather than simply the net for the current month. I have added a Running Total Table calculation to the value in the pivot table, but this accumulates the running total in the adds and losses rows when I ONLY want it to accumulate in the totals section:

The last method I tried was to add 2 instances of my value to the pivot table: one for just the monthly value and one set to be a running total. The result looks like this:

This is just very cluttered and difficult to discern what is going on. I wish there was a way to hide the running total on the add/losses rows so that I could only see the running total of the Net difference at the bottom. Does anyone have any advice on how to do this and achieve an end result that looks like the first table?

Hi @TheCardlessMoose -

You are almost there. You can achieve your desired view by pivoting your data with calculated fields.

Step 1 - Create a calculated field for your adds
c_add
ifelse(event='add',qty,0)

Step 2 - Create a calculated field for your losses
c_loss
ifelse(event='loss',qty,0)

Step 3 - Create a calculated field for your net
{c_add}+{c_loss}

Step 4 - Create calculated field for your running net total
c_running_total
runningSum(sum({c_net}), [dt ASC])

Step 5 - Add to pivot table and swap columns to rows for the values (top right of values well)

You can rename your value names in the format visual pane.

This works perfectly! Thank you!

1 Like