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
Recall & Review
beginner
What is the 'Difference' calculation in Tableau?
It is a calculation that shows the change between two values by subtracting one value from another, often used to compare current and previous periods.
Click to reveal answer
beginner
How do you calculate 'Percent Difference' in Tableau?
Percent Difference is calculated by dividing the difference between two values by the original value, then multiplying by 100 to get a percentage.
Click to reveal answer
intermediate
Which Tableau table calculation is commonly used to find the difference between values?
The 'Difference' table calculation, which subtracts the previous value from the current value in a partition.
Click to reveal answer
beginner
What does a positive percent difference indicate in a sales report?
It indicates that sales have increased compared to the previous period.
Click to reveal answer
intermediate
Why is it important to set the correct addressing and partitioning in Tableau when calculating difference or percent difference?
Because it controls how Tableau computes the calculation across data, ensuring accurate comparison between the right values (like dates or categories).
Click to reveal answer
What does the 'Difference' calculation in Tableau show?
AThe sum of two values
BThe average of values
CThe change between two values
DThe percentage of total
✗ Incorrect
Difference shows how much one value changes compared to another by subtracting them.
How do you express percent difference in Tableau?
A(Current Value - Previous Value) / Previous Value * 100
BCurrent Value + Previous Value
CPrevious Value / Current Value * 100
DCurrent Value * Previous Value
✗ Incorrect
Percent difference is the difference divided by the original value, multiplied by 100.
Which Tableau feature helps calculate difference between rows?
ATable Calculation
BParameter
CFilter
DData Source
✗ Incorrect
Table Calculations allow row-by-row computations like difference.
If percent difference is negative, what does it mean?
AValues stayed the same
BValues increased
CCalculation error
DValues decreased
✗ Incorrect
A negative percent difference means the value decreased compared to the previous.
Why adjust addressing and partitioning in difference calculations?
ATo change colors
BTo control calculation direction and grouping
CTo add filters
DTo rename fields
✗ Incorrect
Addressing and partitioning define how Tableau computes differences across data groups.
Explain how to create a percent difference calculation in Tableau and why it is useful.
Think about comparing sales from one month to the next.
You got /4 concepts.
Describe the role of addressing and partitioning when using difference calculations in Tableau.
Consider how Tableau knows which rows to compare.
You got /4 concepts.
Practice
(1/5)
1. What does the Difference calculation in Tableau typically show?
easy
A. The total sum of all values
B. The average value over time
C. How much a value changed between two points
D. The maximum value in a dataset
Solution
Step 1: Understand the meaning of Difference
Difference measures the change in value from one point to another, showing increase or decrease.
Step 2: Compare with other options
Sum, average, and maximum describe different calculations unrelated to change between points.
Final Answer:
How much a value changed between two points -> Option C
Quick Check:
Difference = Change amount [OK]
Hint: Difference = New value minus old value [OK]
Common Mistakes:
Confusing difference with total sum
Thinking difference shows average
Mixing difference with maximum value
2. Which of the following Tableau calculations correctly computes the percent difference between the current and previous value?
easy
A. ([Current Value] - [Previous Value]) / [Previous Value]
B. ([Previous Value] - [Current Value]) / [Current Value]
C. [Current Value] + [Previous Value] / [Previous Value]
D. [Current Value] * [Previous Value]
Solution
Step 1: Recall percent difference formula
Percent difference = (New - Old) / Old, showing change relative to original.
Step 2: Match formula to options
([Current Value] - [Previous Value]) / [Previous Value] matches formula exactly; others either reverse or misuse operations.
Subtracting previous from current gives the difference in sales between rows.
Final Answer:
The difference in sales between the current and previous row -> Option D
Quick Check:
LOOKUP difference = sales change [OK]
Hint: LOOKUP with offset -1 gets previous row value [OK]
Common Mistakes:
Thinking it calculates percent difference
Assuming it sums all sales
Confusing current and previous row values
4. You wrote this Tableau formula to calculate percent difference: (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / SUM([Sales]) But the results seem incorrect. What is the likely error?
medium
A. Not using WINDOW_SUM instead of SUM
B. Dividing by current sales instead of previous sales
C. Subtracting current sales from previous sales
D. Using LOOKUP with offset -1 incorrectly
Solution
Step 1: Analyze denominator in formula
The formula divides by SUM([Sales]) which is current sales, but percent difference should divide by previous sales.
Step 2: Identify correct denominator
Correct formula divides by LOOKUP(SUM([Sales]), -1) to get previous sales as denominator.
Final Answer:
Dividing by current sales instead of previous sales -> Option B
Quick Check:
Percent difference denominator = previous value [OK]
Hint: Divide by previous value, not current, for percent difference [OK]
Common Mistakes:
Using current value as denominator
Confusing subtraction order
Misusing LOOKUP offset
5. You want to create a Tableau dashboard showing monthly sales percent difference compared to the previous month. Which approach correctly calculates this and handles months with zero sales without errors?
hard
A. Use (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / NULLIF(LOOKUP(SUM([Sales]), -1), 0) to avoid division by zero
B. Use (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / SUM([Sales]) ignoring zero sales
C. Use SUM([Sales]) / LOOKUP(SUM([Sales]), -1) without subtraction
D. Use WINDOW_SUM(SUM([Sales])) - WINDOW_SUM(SUM([Sales])) for difference
Solution
Step 1: Calculate percent difference with zero check
Percent difference = (Current - Previous) / Previous; use NULLIF to avoid division by zero errors when previous sales are zero.
Step 2: Evaluate options for correctness
Use (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / NULLIF(LOOKUP(SUM([Sales]), -1), 0) to avoid division by zero uses NULLIF to prevent errors; others either divide by current or ignore zero sales causing errors or wrong results.
Final Answer:
Use (SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / NULLIF(LOOKUP(SUM([Sales]), -1), 0) to avoid division by zero -> Option A
Quick Check:
Use NULLIF to handle zero denominator [OK]
Hint: Use NULLIF to prevent division by zero in percent difference [OK]