What if you could see your sales adding up automatically, without lifting a finger?
Why Running total in Tableau? - Purpose & Use Cases
Start learning this pattern below
Jump into concepts and practice - no test required
Imagine you have a long list of daily sales numbers in a spreadsheet. You want to see how sales add up over time, but you have to add each day's sales to the total of all previous days by hand.
Doing this manually is slow and tiring. You might make mistakes adding numbers, especially if the list is long. Every time new data comes in, you have to redo all the sums again.
Using a running total in Tableau automatically adds each value to the sum of all previous values. It updates instantly when data changes, saving time and avoiding errors.
Day 1: 100 Day 2: 100 + 150 = 250 Day 3: 250 + 200 = 450
RUNNING_SUM(SUM([Sales]))
It lets you quickly see how numbers build up over time, helping you spot trends and make better decisions.
A store manager tracks daily sales to see how revenue grows during a promotion, adjusting strategies based on the running total.
Manual addition is slow and error-prone.
Running total automates cumulative sums instantly.
It helps visualize growth and trends over time.
Practice
RUNNING_SUM() function do in Tableau?Solution
Step 1: Understand the purpose of RUNNING_SUM()
RUNNING_SUM() adds values cumulatively across a sorted dimension, like dates.Step 2: Compare with other functions
Unlike average or count, RUNNING_SUM() accumulates values step-by-step.Final Answer:
Calculates a cumulative total by adding values step-by-step -> Option AQuick Check:
RUNNING_SUM() = cumulative total [OK]
- Confusing RUNNING_SUM() with average or count functions
- Thinking it filters data instead of summing cumulatively
- Assuming it resets for each row instead of accumulating
Solution
Step 1: Identify correct function usage
RUNNING_SUM() wraps an aggregation like SUM() to calculate cumulative totals.Step 2: Check syntax correctness
RUNNING_SUM(SUM([Sales])) uses RUNNING_SUM(SUM([Sales])) which is valid; others use incorrect or non-existent functions.Final Answer:
RUNNING_SUM(SUM([Sales])) -> Option AQuick Check:
RUNNING_SUM(SUM()) is correct syntax [OK]
- Using RUNNING_TOTAL instead of RUNNING_SUM
- Placing SUM outside RUNNING_SUM incorrectly
- Using non-existent functions like TOTAL_SUM
Date | Sales
Jan 1 | 100
Jan 2 | 150
Jan 3 | 200What is the running total on Jan 3 using
RUNNING_SUM(SUM([Sales]))?Solution
Step 1: Calculate daily sums
Sales are 100 on Jan 1, 150 on Jan 2, and 200 on Jan 3.Step 2: Compute running total up to Jan 3
Running total = 100 + 150 + 200 = 450.Final Answer:
450 -> Option CQuick Check:
100+150+200 = 450 [OK]
- Taking only current day sales instead of cumulative
- Adding only two days instead of three
- Confusing running total with daily sales
RUNNING_SUM(SUM([Sales])) but the values reset unexpectedly for each category. What is the likely cause?Solution
Step 1: Understand table calculation partitioning
Table calculations like RUNNING_SUM reset when partitioned by a dimension, here category.Step 2: Identify cause of reset
If partitioning is by category, running total restarts for each category separately.Final Answer:
The table calculation is partitioned by category, causing reset -> Option BQuick Check:
Partitioning causes running total reset [OK]
- Assuming syntax error causes reset
- Believing RUNNING_SUM can't work with categories
- Ignoring partitioning in table calculations
Solution
Step 1: Understand filter order impact
Regular filters applied after table calculations can break running totals by removing data points.Step 2: Use context filter to limit data first
Context filters limit data before calculations, preserving running total logic for current year only.Final Answer:
Use a context filter for current year before applying RUNNING_SUM(SUM([Sales])) -> Option DQuick Check:
Context filter preserves running total correctness [OK]
- Applying regular filter after running total breaks calculation
- Not filtering data, showing all years
- Using calculated field without proper filtering
