Tableau practice: Dates, durations and business calendars
Chapter 8 · 5 questions · included in full access
Question 1 · easy
Order quarter label
Solve it in your browserCreate Order Quarter: format the quarter of the Order Date as
'Q' + STR(QUARTER([Order Date])).Question 2 · easy
Fulfillment duration
Solve it in your browserCreate Days to Ship: compute the elapsed days between Order Date and Ship Date:
DATEDIFF('day', [Order Date], [Ship Date]).Question 3 · easy
DATEDIFF parameter order
Solve it in your browserWhat happens if you accidentally reverse the dates in
DATEDIFF('day', [Ship Date], [Order Date])when shipments happen after orders?Question 4 · medium
Weekend order flag
Solve it in your browserCreate Is Weekend: return True if the Order Date falls on Sunday (1) or Saturday (7) using DATEPART.
Question 5 · medium
Truncated month date
Solve it in your browserCreate Month Start: truncate the Order Date down to the first day of the month using
DATETRUNC('month', [Order Date]).
These questions are part of full access.
The first chapters of every track are free. Full access is a one-time payment.
See pricing