Tableau practice: Moving windows and time series lookups
Chapter 17 · 5 questions · included in full access
Question 1 · hard
Three-month moving average
Solve it in your browserCreate 3 Month Avg: the average of SUM(Sales) over the current month and the two months before it:
WINDOW_AVG(SUM([Sales]), -2, 0).Question 2 · medium
Month over month growth
Solve it in your browserCreate MoM Growth: current month's Sales compared with the previous month:
(SUM([Sales]) - LOOKUP(SUM([Sales]), -1)) / ABS(LOOKUP(SUM([Sales]), -1)).Question 3 · easy
WINDOW offset indexing
Solve it in your browserIn
WINDOW_AVG(SUM([Sales]), start, end), which parameters define a trailing window of the previous month and current month?Question 4 · medium
Rolling two-month sum
Solve it in your browserCreate Rolling 2M Sum: sum of sales across the previous month and current month:
WINDOW_SUM(SUM([Sales]), -1, 0).Question 5 · medium
Prior period sales lookup
Solve it in your browserCreate Prior Month Sales: fetch the previous mark sales value using
LOOKUP(SUM([Sales]), -1).
These questions are part of full access.
The first chapters of every track are free. Full access is a one-time payment.
See pricing