0
0
Tableaubi_tool~20 mins

Date filters in Tableau - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Date Filter Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate sales for the last 30 days using a date filter
You have a sales dataset with a [Order Date] field. Which DAX measure correctly calculates total sales for the last 30 days from today?
ATotalSalesLast30Days = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Order Date] <= TODAY() - 30))
BTotalSalesLast30Days = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Order Date] > TODAY() + 30))
CTotalSalesLast30Days = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Order Date] >= TODAY() - 30))
DTotalSalesLast30Days = CALCULATE(SUM(Sales[Amount]), FILTER(Sales, Sales[Order Date] < TODAY()))
Attempts:
2 left
💡 Hint
Think about filtering dates that are within the last 30 days, including today.
visualization
intermediate
2:00remaining
Best practice for date filter in Tableau dashboard
You want to add a date filter to your Tableau dashboard that lets users select a range of dates easily. Which option is the best practice for this filter?
AUse a continuous date slider filter that allows users to select any date range.
BUse a text box where users type dates manually.
CUse a discrete date filter with only year values to limit options.
DUse a filter that only allows selecting a single fixed date.
Attempts:
2 left
💡 Hint
Think about user flexibility and ease of use for date selection.
🧠 Conceptual
advanced
2:00remaining
Understanding relative date filters in Tableau
Which statement best describes how a relative date filter works in Tableau?
AIt filters data only by specific years selected manually by the user.
BIt filters data based on a fixed date range set by the developer that does not change over time.
CIt filters data by excluding weekends and holidays automatically.
DIt filters data dynamically based on the current date, such as last 7 days or last month.
Attempts:
2 left
💡 Hint
Think about filters that update automatically as time passes.
🔧 Formula Fix
advanced
2:00remaining
Identify the error in this Tableau date filter calculation
This calculated field is intended to filter sales from the last 90 days:

IF [Order Date] >= DATEADD('day', -90, TODAY()) THEN [Sales] ELSE 0 END

What is the problem with this calculation?
Tableau
IF [Order Date] >= DATEADD('day', -90, TODAY()) THEN [Sales] ELSE 0 END
AThe calculation returns sales values but does not filter data; it should be used as a filter condition.
BThe function TODAY() is not valid in Tableau; use NOW() instead.
CDATEADD cannot use negative numbers; it must be positive.
DThe ELSE 0 part causes errors because sales cannot be zero.
Attempts:
2 left
💡 Hint
Think about the difference between calculated fields and filters in Tableau.
🎯 Scenario
expert
3:00remaining
Designing a dashboard with multiple date filters affecting different charts
You have a Tableau dashboard with two charts: one shows monthly sales, the other shows daily customer visits. You want to add two date filters: one for selecting months affecting the sales chart, and one for selecting days affecting the visits chart. How should you configure the filters to avoid confusion and ensure correct filtering?
AUse a single date filter for both charts to keep the dashboard simple and synchronized.
BUse two separate date filters with different field scopes and apply each filter only to its related chart using filter actions or context filters.
CUse two date filters but apply both filters to all charts to ensure consistency.
DUse one date filter for the sales chart and a text input for the visits chart to allow manual date entry.
Attempts:
2 left
💡 Hint
Think about how filters can be scoped to specific worksheets in Tableau.