Given two dates, Order Date as 2024-01-10 and Ship Date as 2024-01-15, what is the result of the following Tableau calculation?
DATEDIFF('day', [Order Date], [Ship Date])DATEDIFF counts the number of day boundaries crossed from the first date to the second.
The difference between 2024-01-10 and 2024-01-15 is 5 days because it counts the days between the two dates, excluding the start date.
What is the result of this Tableau calculation if Order Date is 2024-03-31?
DATEADD('month', 1, [Order Date])Adding one month to March 31 adjusts to the last valid day of April.
Since April has only 30 days, adding one month to March 31 results in April 30.
You want to show the month-over-month sales growth percentage for the last 12 months. Which visualization type is best to clearly show this trend?
Trends over time are best shown with continuous lines.
A line chart clearly shows how sales growth changes month to month, making trends easy to spot.
You have Start Date as 2023-11-15 and End Date as 2024-05-10. Using Tableau's DATEDIFF function, what is the quarter difference?
DATEDIFF('quarter', [Start Date], [End Date])Count how many quarter boundaries are crossed from start to end date.
From Q4 2023 (2023-11-15) to Q2 2024 (2024-05-10) crosses 2 quarter boundaries: January 1, 2024 (start of Q1) and April 1, 2024 (start of Q2).
Which option will cause an error when calculating the difference in days between two dates in Tableau?
DATEDIFF('day', [Date1], [Date2])Assume Date1 and Date2 are fields in the data.
DATEDIFF requires both inputs to be date or datetime types.
If one field is a string, Tableau cannot perform date calculations and will raise an error.