0
0
Tableaubi_tool~10 mins

Rolling period calculations 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 calculate a 3-month rolling sum of Sales.

Tableau
WINDOW_SUM(SUM([Sales]), -[1], 0)
Drag options to blanks, or click blank then click option'
A2
B1
C3
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 3 instead of 2 for the offset
Using positive offsets which look forward instead of backward
2fill in blank
medium

Complete the code to calculate a 7-day rolling average of Profit.

Tableau
WINDOW_AVG(SUM([Profit]), -[1], 0)
Drag options to blanks, or click blank then click option'
A1
B7
C6
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using 7 instead of 6 for the offset
Using positive offsets
3fill in blank
hard

Fix the error in the rolling calculation to correctly compute a 12-month rolling sum of Quantity.

Tableau
WINDOW_SUM(SUM([Quantity]), [1], 0)
Drag options to blanks, or click blank then click option'
A11
B-11
C-12
D12
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive offsets
Using -12 which excludes current month
4fill in blank
hard

Fill both blanks to calculate a 4-week rolling average of Sales with correct window offsets.

Tableau
WINDOW_AVG(SUM([Sales]), [1], [2])
Drag options to blanks, or click blank then click option'
A-3
B0
C3
D-4
Attempts:
3 left
💡 Hint
Common Mistakes
Using -4 which excludes current week
Using positive offsets
5fill in blank
hard

Fill all three blanks to calculate a 5-day rolling sum of Profit with correct window offsets and aggregation.

Tableau
[1](SUM([Profit]), [2], [3])
Drag options to blanks, or click blank then click option'
AWINDOW_SUM
B-4
C0
DWINDOW_AVG
Attempts:
3 left
💡 Hint
Common Mistakes
Using WINDOW_AVG instead of WINDOW_SUM
Incorrect offsets that exclude days