Complete the code to create a continuous date axis in Tableau.
DATETRUNC('[1]', [Order Date])
Using YEAR in DATETRUNC groups dates by year, which helps reveal yearly trends.
Complete the calculation to find the moving average over 3 months.
WINDOW_AVG(SUM([Sales]), -[1], 0)
The window starts 2 rows before the current row and ends at the current row, covering 3 months total.
Fix the error in this calculated field to compute year-over-year sales growth.
([Sales] - LOOKUP([Sales], -[1])) / LOOKUP([Sales], -[1])
Using 12 as the offset compares sales to the same month last year, revealing yearly growth.
Fill both blanks to create a filter that shows data only for the last 6 months.
DATEDIFF('[1]', [2], TODAY()) <= 6
DATEDIFF calculates the difference in months between [Order Date] and today, filtering last 6 months.
Fill all three blanks to calculate cumulative sales over time.
RUNNING_SUM(SUM([1])) OVER (ORDER BY [2] [3])
RUNNING_SUM sums sales cumulatively ordered by date ascending to show growth over time.