0
0
Tableaubi_tool~20 mins

Creating calculated fields in Tableau - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Calculated Fields Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate Total Sales per Region using LOD Expression
You have a sales dataset with fields: [Sales], [Region], and [Date]. You want to create a calculated field that shows the total sales for each region regardless of the date filter applied. Which Tableau LOD expression will correctly calculate this?
A{FIXED [Region] : SUM([Sales])}
BSUM([Sales])
C{EXCLUDE [Region] : SUM([Sales])}
D{INCLUDE [Region] : SUM([Sales])}
Attempts:
2 left
💡 Hint
Think about how to fix the calculation at the region level ignoring other filters.
visualization
intermediate
2:00remaining
Identify the Correct Visualization for a Calculated Profit Ratio
You created a calculated field in Tableau called Profit Ratio defined as SUM([Profit]) / SUM([Sales]). Which visualization best shows the profit ratio by product category with clear comparison?
APie chart showing total sales by product category
BLine chart showing profit ratio trend over time
CStacked bar chart showing profit and sales side by side
DBar chart with product categories on the x-axis and profit ratio on the y-axis
Attempts:
2 left
💡 Hint
You want to compare profit ratios across categories clearly.
data_modeling
advanced
2:30remaining
Create a Calculated Field to Show Year-over-Year Sales Growth
You have a dataset with [Sales] and [Order Date]. You want to create a calculated field in Tableau that shows the percentage growth of sales compared to the previous year. Which formula correctly calculates this?
A(SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / LOOKUP(SUM([Sales]), -1)
B(SUM([Sales]) - ZN(LOOKUP(SUM([Sales]), -1))) / ZN(LOOKUP(SUM([Sales]), -1))
C(SUM([Sales]) - LOOKUP(SUM([Sales]), 1)) / LOOKUP(SUM([Sales]), 1)
D(SUM([Sales]) - PREVIOUS_VALUE(SUM([Sales]))) / PREVIOUS_VALUE(SUM([Sales]))
Attempts:
2 left
💡 Hint
Consider handling null values for the first year.
🔧 Formula Fix
advanced
2:00remaining
Identify the Error in This Calculated Field for Average Sales
You wrote this calculated field in Tableau to find average sales per customer: SUM([Sales]) / COUNTD([Customer ID]). However, the result is incorrect when filters are applied. What is the main reason?
Tableau
SUM([Sales]) / COUNTD([Customer ID])
AThe calculation does not use FIXED LOD, so filters affect numerator and denominator differently.
BCOUNTD cannot be used in calculated fields.
CSUM([Sales]) should be replaced with AVG([Sales]) for average calculation.
DThe formula needs to use WINDOW_SUM instead of SUM.
Attempts:
2 left
💡 Hint
Think about how filters affect aggregation in numerator and denominator.
🎯 Scenario
expert
3:00remaining
Design a Calculated Field to Flag Top 10% Customers by Sales
You want to create a calculated field in Tableau that flags customers whose total sales are in the top 10% of all customers. Which formula correctly creates this flag?
AIF PERCENTILE(SUM([Sales]), 0.9) THEN 'Top 10%' ELSE 'Others' END
BIF RANK_PERCENTILE(SUM([Sales])) <= 0.1 THEN 'Top 10%' ELSE 'Others' END
CIF RANK_PERCENTILE(SUM([Sales])) >= 0.9 THEN 'Top 10%' ELSE 'Others' END
DIF WINDOW_PERCENTILE(SUM([Sales]), 0.9) THEN 'Top 10%' ELSE 'Others' END
Attempts:
2 left
💡 Hint
Remember that top 10% means percentile rank greater than or equal to 0.9.