0
0
Tableaubi_tool~20 mins

Parameter in calculated fields in Tableau - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Parameter Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Using Parameter in a Calculated Field to Filter Sales

You have a parameter named SelectedRegion with values: 'East', 'West', 'Central'. You create a calculated field:

IF [Region] = [SelectedRegion] THEN [Sales] ELSE 0 END

What will be the sum of this calculated field if the parameter is set to 'West' and the data contains sales for all regions?

ASum of sales for all regions except West
BSum of sales for all regions
CZero, because parameters cannot be used in calculated fields
DSum of sales only for the West region
Attempts:
2 left
💡 Hint

Think about how the parameter value filters the calculation.

visualization
intermediate
2:00remaining
Visualizing Sales by Dynamic Category Using Parameter

You create a parameter CategorySelector with values 'Category A', 'Category B', and 'Category C'. You use this parameter in a calculated field to show sales for the selected category. Which visualization best helps users understand sales changes when switching the parameter?

AA line chart showing sales over time with a filter for the selected category parameter
BA bar chart with sales on Y-axis and categories on X-axis, filtered by the parameter
CA pie chart showing sales distribution for all categories ignoring the parameter
DA scatter plot of sales vs. profit without using the parameter
Attempts:
2 left
💡 Hint

Consider how the parameter changes the category dynamically over time.

🧠 Conceptual
advanced
2:00remaining
Understanding Parameter Scope in Calculated Fields

Which statement about parameters used in Tableau calculated fields is correct?

AParameters automatically update based on data changes without user input
BParameters are static values that do not change unless the user interacts with them
CParameters can dynamically filter data at the data source level before loading
DParameters can be used to create dynamic sets that update automatically
Attempts:
2 left
💡 Hint

Think about how parameters behave compared to filters.

data_modeling
advanced
2:00remaining
Using Parameter to Switch Measures in a Single View

You want to create a dashboard where users can select a measure (Sales, Profit, or Quantity) via a parameter and see the selected measure in a single chart. Which calculated field formula correctly uses the parameter MeasureSelector to switch measures?

AIF [MeasureSelector] = 'Sales' THEN SUM([Sales]) ELSEIF [MeasureSelector] = 'Profit' THEN SUM([Profit]) ELSE SUM([Quantity]) END
BCASE [MeasureSelector] WHEN 'Sales' THEN SUM([Sales]) WHEN 'Profit' THEN SUM([Profit]) ELSE SUM([Quantity]) END
CIF [MeasureSelector] = 'Sales' THEN [Sales] ELSEIF [MeasureSelector] = 'Profit' THEN [Profit] ELSE [Quantity] END
DSWITCH([MeasureSelector], 'Sales', SUM([Sales]), 'Profit', SUM([Profit]), SUM([Quantity]))
Attempts:
2 left
💡 Hint

Remember that aggregations like SUM should be applied to the calculated field in the view, not inside it.

🔧 Formula Fix
expert
2:00remaining
Debugging Parameter Usage in a Complex Calculated Field

Given the parameter DiscountRate (values 0, 0.05, 0.1) and the calculated field:

IF [DiscountRate] > 0 THEN [Sales] * (1 - [DiscountRate]) ELSE [Sales] END

Users report that the discount is not applied even when selecting 0.05 or 0.1. What is the most likely cause?

AThe parameter is a string type, so the comparison [DiscountRate] > 0 always fails
BThe parameter values are not connected to the calculated field properly
CThe calculated field syntax is invalid and causes errors
DThe ELSE clause overrides the discount calculation
Attempts:
2 left
💡 Hint

Check the data type of the parameter and how it is compared.