Question 1
Q1A financial services company is analyzing stock price volatility. An analyst has created a visualization showing daily stock prices. To measure volatility, they need to calculate the standard deviation of the stock price over a rolling 30-day window. Which function is the most appropriate and direct way to achieve this in Tableau?
Show answer & explanation
Correct answer: C
The WINDOW_STDEV function is a table calculation specifically designed to compute the standard deviation over a moving window of data. The arguments (SUM([Stock Price]), -29, 0) correctly define the aggregation and the window, which includes the current day and the 29 preceding days, making a 30-day rolling period. STDEV() is a regular aggregation and calculates the standard deviation for the entire partition. The FIXED LOD would calculate the standard deviation for each stock ticker across all time, not a rolling window.