8 Replies Latest reply on Apr 16, 2018 11:25 PM by Tushar More

# Standard Deviation Over time

Hi all,

I am trying to compute the standard deviation over time on my data set. Please see below:

The primary use case is to detect surge in counts for the field. However, the results I got shows a single standard deviation across the time frame. I am using a calculated field with WINDOW_STDEVP(count([item]))

Due to the sensitive of the data, I can't upload the workbook, but following is the sample data set:

time, item

01-Dec, test

02-Dec, test1

02-Dec, test

02-Dec, test2

03-Dec, test

04-Dec, test1

The expected output will be the moving standard deviation and to detect a surge in the count of item at each time frame and in turn, increase in the standard deviation

thank you so much!

cheers,

Ken

• ###### 1. Re: Standard Deviation Over time

Hi Ken,

See if this can help.

~Tushar

1 of 1 people found this helpful
• ###### 2. Re: Standard Deviation Over time

Hi Tushar,

noted and thanks for the update! Yes it showing a moving deviation now:

For my learning purposes, can i confirm that start: FIRST(), refers to first row, how about 0?

Also, the computed SD is different from using Tableau's distribution band. Please see below:

The SD shown is 1,283.137 using the distribution band. As such, how can I correctly perceived data in table form to identify deviation exceeding the upper threshold?

thanks!

Ken

• ###### 3. Re: Standard Deviation Over time

Ken,

Please mock up some data and share.

~Tushar

• ###### 4. Re: Standard Deviation Over time

In the meantime, you can try this. I used superstore for this.

~Tushar

• ###### 5. Re: Standard Deviation Over time

Hi Tushar,

thanks so much again! it works! appreciate your help!

please see sample package workbook as attached. So essentially, the upper bound when using the tableau Standard Distribution band is computed as follows?:

WINDOW_AVG(SUM(COUNT)) + WINDOW_STDDEVP(SUM(COUNT))

thank you Tushar for your help so far!

Regards,

Ken

• ###### 6. Re: Standard Deviation Over time

Hi Ken,

The formula is used to find upper and lower bounds. As you can see it is correctly highlighting the values.

For my learning purposes, can i confirm that start: FIRST(), refers to first row, how about 0?

0 refers to current row. It is equivalent to running sum. So basically it adds values from first to current row in the partition.

~Tushar