Bird
Raised Fist0
Tableaubi_tool~20 mins

Running total in Tableau - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Running Total Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate Running Total Using Table Calculation
You have monthly sales data in Tableau. Which table calculation formula correctly computes the running total of sales ordered by month?
ASUM([Sales])
BTOTAL(SUM([Sales]))
CWINDOW_SUM(SUM([Sales]), FIRST(), LAST())
DRUNNING_SUM(SUM([Sales]))
Attempts:
2 left
💡 Hint

Think about which function accumulates values over a range.

visualization
intermediate
2:00remaining
Best Visualization for Running Total Trend
You want to show the running total of sales over time to your manager. Which visualization type best shows the cumulative trend clearly?
APie chart showing sales distribution by month
BBar chart showing monthly sales side by side
CLine chart with running total on Y-axis and time on X-axis
DScatter plot of sales vs. month
Attempts:
2 left
💡 Hint

Think about which chart type shows trends over time smoothly.

🧠 Conceptual
advanced
2:00remaining
Understanding Partitioning in Running Totals
In Tableau, you apply a running total table calculation on sales partitioned by region and ordered by month. What happens if you remove the partitioning by region?
AThe running total will show only the first region's sales
BThe running total will accumulate sales across all regions combined over time
CThe calculation will produce an error due to missing partition
DThe running total will reset for each region separately
Attempts:
2 left
💡 Hint

Partitioning controls where the running total resets.

🔧 Formula Fix
advanced
2:00remaining
Fixing Incorrect Running Total Calculation
You created a running total of sales by month but notice the total resets unexpectedly within the same year. Which option explains the likely cause?
AThe calculation is ordered by sales amount instead of date
BThe table calculation is partitioned by month instead of year
CThe running total uses WINDOW_SUM instead of RUNNING_SUM
DThe data source has missing months causing reset
Attempts:
2 left
💡 Hint

Ordering affects how running totals accumulate.

🎯 Scenario
expert
3:00remaining
Running Total with Multiple Dimensions and Filters
You have sales data by region, product category, and month. You want a running total of sales by month that ignores filters on product category but respects filters on region. How do you configure the running total calculation in Tableau?
AUse RUNNING_SUM(SUM([Sales])) with context filter on region and exclude product category filter
BUse RUNNING_SUM(SUM([Sales])) with all filters applied normally
CUse WINDOW_SUM(SUM([Sales])) partitioned by product category and region
DUse RUNNING_SUM(SUM([Sales])) and apply product category filter as context filter
Attempts:
2 left
💡 Hint

Context filters affect calculation order and what data is included.

Practice

(1/5)
1. What does the RUNNING_SUM() function do in Tableau?
easy
A. Calculates a cumulative total by adding values step-by-step
B. Finds the average of all values in a column
C. Counts the number of rows in a dataset
D. Filters data based on a condition

Solution

  1. Step 1: Understand the purpose of RUNNING_SUM()

    RUNNING_SUM() adds values cumulatively across a sorted dimension, like dates.
  2. Step 2: Compare with other functions

    Unlike average or count, RUNNING_SUM() accumulates values step-by-step.
  3. Final Answer:

    Calculates a cumulative total by adding values step-by-step -> Option A
  4. Quick Check:

    RUNNING_SUM() = cumulative total [OK]
Hint: Think 'running total' means adding values one after another [OK]
Common Mistakes:
  • 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
2. Which of the following is the correct syntax to create a running total of Sales in Tableau?
easy
A. RUNNING_SUM(SUM([Sales]))
B. SUM(RUNNING_SUM([Sales]))
C. RUNNING_TOTAL(SUM([Sales]))
D. TOTAL_SUM([Sales])

Solution

  1. Step 1: Identify correct function usage

    RUNNING_SUM() wraps an aggregation like SUM() to calculate cumulative totals.
  2. Step 2: Check syntax correctness

    RUNNING_SUM(SUM([Sales])) uses RUNNING_SUM(SUM([Sales])) which is valid; others use incorrect or non-existent functions.
  3. Final Answer:

    RUNNING_SUM(SUM([Sales])) -> Option A
  4. Quick Check:

    RUNNING_SUM(SUM()) is correct syntax [OK]
Hint: RUNNING_SUM wraps an aggregation like SUM inside [OK]
Common Mistakes:
  • Using RUNNING_TOTAL instead of RUNNING_SUM
  • Placing SUM outside RUNNING_SUM incorrectly
  • Using non-existent functions like TOTAL_SUM
3. Given the following daily sales data:

Date | Sales
Jan 1 | 100
Jan 2 | 150
Jan 3 | 200


What is the running total on Jan 3 using RUNNING_SUM(SUM([Sales]))?
medium
A. 200
B. 150
C. 450
D. 100

Solution

  1. Step 1: Calculate daily sums

    Sales are 100 on Jan 1, 150 on Jan 2, and 200 on Jan 3.
  2. Step 2: Compute running total up to Jan 3

    Running total = 100 + 150 + 200 = 450.
  3. Final Answer:

    450 -> Option C
  4. Quick Check:

    100+150+200 = 450 [OK]
Hint: Add all previous sales including current date [OK]
Common Mistakes:
  • Taking only current day sales instead of cumulative
  • Adding only two days instead of three
  • Confusing running total with daily sales
4. You created a running total using RUNNING_SUM(SUM([Sales])) but the values reset unexpectedly for each category. What is the likely cause?
medium
A. SUM([Sales]) is incorrect syntax
B. The table calculation is partitioned by category, causing reset
C. RUNNING_SUM() cannot be used with categories
D. Data source has missing sales values

Solution

  1. Step 1: Understand table calculation partitioning

    Table calculations like RUNNING_SUM reset when partitioned by a dimension, here category.
  2. Step 2: Identify cause of reset

    If partitioning is by category, running total restarts for each category separately.
  3. Final Answer:

    The table calculation is partitioned by category, causing reset -> Option B
  4. Quick Check:

    Partitioning causes running total reset [OK]
Hint: Check partitioning settings if running total resets [OK]
Common Mistakes:
  • Assuming syntax error causes reset
  • Believing RUNNING_SUM can't work with categories
  • Ignoring partitioning in table calculations
5. You want to show a running total of monthly sales but only for the current year. Which approach correctly applies this filter without breaking the running total calculation?
hard
A. Use RUNNING_SUM(SUM([Sales])) without any filters
B. Apply a regular filter for current year after creating the running total
C. Create a calculated field that sums sales only if year equals current year, then apply RUNNING_SUM
D. Use a context filter for current year before applying RUNNING_SUM(SUM([Sales]))

Solution

  1. Step 1: Understand filter order impact

    Regular filters applied after table calculations can break running totals by removing data points.
  2. Step 2: Use context filter to limit data first

    Context filters limit data before calculations, preserving running total logic for current year only.
  3. Final Answer:

    Use a context filter for current year before applying RUNNING_SUM(SUM([Sales])) -> Option D
  4. Quick Check:

    Context filter preserves running total correctness [OK]
Hint: Filter data first with context filter, then run running total [OK]
Common Mistakes:
  • Applying regular filter after running total breaks calculation
  • Not filtering data, showing all years
  • Using calculated field without proper filtering