How to Calculate Running Total in Tableau

Опубликовано: 02 Октябрь 2024
на канале: Ynteractive Training
7,883
19

How do you use running total and calculate it in tableau in this example I have sum of sales by month and I have the running total sum of sales by month in addition to running some you can also do running average running Min and running Max let's take a look at how to do that in tableau I have a line chart built with sum of sales by month let's take a look at how to add a running total now write a calculated field and call it running total

Calculation is going to be running underscore sum

And then pass in sum of sales

Let's click apply and okay

Drag running sum into the view and you'll see I have the running sum of sum of sales if I had a field like region in the view let's put that on rows I would need to make sure the running sum is commuted for each region so let's edit the table calculation

And make sure under specific dimensions region is unchecked when region is unchecked it means you are calculating the running total for each region a long month at Region bin checked the line would be the same for each region so the running total goes up to 2.2 million and this running total goes up to 2.2 million as well it's uncheck region close it up

Let's make this into dual axis and then turn it into running average running bin and running Max click on the drop down I'm running total click dual access I'm going to change running total to be an area chart

And leave some with sales as a line let's go into running total and change it to a running average

All you need to do is swap sum with average make sure you keep sum of sales in the view you don't want to change this to average sales we're doing the running sum of the sum of sales let's click ok and we have a rounding average for East in June 2019 the average was 9 300. And a little later in the year it had moved up to ten thousand you can also change it to Running Man or running Max and that's how to compute running total in tableau