
1. Re: Standard Deviation in Calculated Field Using Dimension
Ramon Martinez Dec 26, 2013 10:29 PM (in response to mark.jurriesii)Hello Mark,
To solve your scenario and requirements we have to use Table Calculation for calculating Mean, Standard Deviation and Zscore based on aggregated data per month.
Table calculations (Mean, Stdev and Zscore) should be compute using Table down in the configuration of the worksheet Sheet 2.
See attached a workbook using your sample data, specifically Sheet 2
Note: Attached workbook is in version 8.0
I hope this helps,
Best regards,
Ramon

StandardDev.twbx 10.6 KB


2. Re: Standard Deviation in Calculated Field Using Dimension
mark.jurriesii Dec 27, 2013 5:23 AM (in response to Ramon Martinez)Thanks for the help, Ramon. I was looking to create a calc that would show the standard deviation without showing the months. Since I'm using a 13month history, I was able to create a calculated field that will be fairly easy to change depending on the timeframe I'm looking at. Appreciate the assist, the support for this product is fantastic.

3. Re: Standard Deviation in Calculated Field Using Dimension
Victor Mora Jul 15, 2015 4:05 PM (in response to Ramon Martinez)Hello:
I have a table with 500 part numbers and 24 months of sales history. I used the STDEV(Sales) in table to calculate a 24months standard deviation and compared against what excel calculates and the numbers are wayoff. (Average are exactly the same). How is the Std Dev calculated in Tableau, is it different than Excel?
Thanks.
Stock Code Excel Tableau Item A 370 69 Item B 551 91 Item C 420 36 Item D 222 22 Item E 687 47 Item F 1,079 67 Item G 2,535 263 Item H 2,232 208 
4. Re: Standard Deviation in Calculated Field Using Dimension
mark.jurriesii Jul 16, 2015 7:03 AM (in response to Victor Mora)Hard to say without knowing how your data is aggregated. You're probably best off using WINDOW_STDEV(metric). This will calculate the standard deviation at the level the window displays. If you're looking at a sum, (i.e. Nov. is part 1 + part 2 + part 3), the stdev will look at each unit instead of the whole thing. But if it's summed in the window, then WINDOW_STDEV will work from there.
You can create the WINDOW_STDEV as a calculated field, then reference it in another field (i.e. WINDOW_AVG) to derive your zscore.