0
0
Tableaubi_tool~10 mins

Relative date filtering in Tableau - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to filter data for the last 7 days using relative date filtering in Tableau.

Tableau
FILTER [Order Date] >= DATEADD('day', [1], TODAY())
Drag options to blanks, or click blank then click option'
A-7
B7
C0
D-30
Attempts:
3 left
💡 Hint
Common Mistakes
Using a positive number which filters future dates.
Using zero which filters only today.
2fill in blank
medium

Complete the code to filter data for the current month using relative date filtering in Tableau.

Tableau
FILTER DATETRUNC('month', [Order Date]) = DATETRUNC('month', [1])
Drag options to blanks, or click blank then click option'
ATODAY()
BDATEADD('month', 1, TODAY())
CNOW()
DDATEADD('month', -1, TODAY())
Attempts:
3 left
💡 Hint
Common Mistakes
Using DATEADD which shifts the month away from current.
Using NOW() which includes time and may cause mismatch.
3fill in blank
hard

Fix the error in the relative date filter to show data from the last 3 months.

Tableau
FILTER [Order Date] >= DATEADD('month', [1], TODAY())
Drag options to blanks, or click blank then click option'
A3
B0
C-3
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive 3 which filters future dates.
Using zero which filters only today.
4fill in blank
hard

Fill both blanks to filter data for the last 14 days excluding today.

Tableau
FILTER [Order Date] > DATEADD('day', [1], TODAY()) AND [Order Date] <= DATEADD('day', [2], TODAY())
Drag options to blanks, or click blank then click option'
A-14
B-1
C0
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 as end date includes today.
Using positive numbers which filter future dates.
5fill in blank
hard

Fill all three blanks to filter data for the current quarter in Tableau.

Tableau
FILTER DATETRUNC('quarter', [Order Date]) = DATETRUNC('[1]', [2]) AND [Order Date] <= [3]
Drag options to blanks, or click blank then click option'
Aquarter
BTODAY()
CNOW()
Dmonth
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'month' instead of 'quarter' for truncation.
Using NOW() which includes time and may cause mismatches.