0
0
Tableaubi_tool~10 mins

Trend analysis 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 create a trend line using Tableau's calculated field.

Tableau
WINDOW_AVG([1])
Drag options to blanks, or click blank then click option'
ASUM([Sales])
BAVG([Profit])
CCOUNT([Orders])
DMIN([Discount])
Attempts:
3 left
💡 Hint
Common Mistakes
Using COUNT or MIN which do not represent continuous trend values.
Using AVG([Profit]) which is valid but less common for total trend analysis.
2fill in blank
medium

Complete the code to calculate the moving average for trend smoothing.

Tableau
WINDOW_AVG(SUM([Sales]), [1], 0)
Drag options to blanks, or click blank then click option'
A-2
B-1
C-3
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive offsets which look forward instead of backward.
Using too large negative offsets which smooth too much.
3fill in blank
hard

Fix the error in the calculated field to correctly compute the percent change over time.

Tableau
([Sales] - LOOKUP([Sales], [1])) / LOOKUP([Sales], [1])
Drag options to blanks, or click blank then click option'
A1
B2
C-1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Using positive offset which looks forward and causes errors.
Using zero offset which compares the value to itself.
4fill in blank
hard

Fill both blanks to create a calculated field that shows cumulative sales over time.

Tableau
RUNNING_SUM([1]) OVER ([2])
Drag options to blanks, or click blank then click option'
ASUM([Sales])
BORDER BY [Date]
CPARTITION BY [Region]
DAVG([Sales])
Attempts:
3 left
💡 Hint
Common Mistakes
Using AVG instead of SUM which does not accumulate correctly.
Using PARTITION BY without ORDER BY which breaks the cumulative logic.
5fill in blank
hard

Fill all three blanks to create a calculated field that calculates the slope of a trend line.

Tableau
SLOPE([1], [2], [3])
Drag options to blanks, or click blank then click option'
A[Date]
B[Sales]
C[Order ID]
D[Profit]
Attempts:
3 left
💡 Hint
Common Mistakes
Using Order ID which is categorical and not numeric.
Mixing up dependent and independent variables.