5 Replies Latest reply on Sep 11, 2018 1:03 PM by Shinichiro Murakami

# How To:  Standard Deviation of a measure already being aggregated

Standard Deviation requires summing up all the data points in a set.

In my case I'm trying to get the STD DEV for my defects per unit.

Defects Per Unit = [Defects] / [Machines] Produced

However, I created a calculation to get my number of [Defects], as well as created a calculation to get my # of [Machines].

SUM([Defects] / [Machines] - cannot be further aggregated so I imagine I will have to change my initial calculations for both, summing them both up before hand... maybe??

Not sure how I can sum this up since the # of machines is dependent on a distinct count of [Serial No]

I think I can change the COUNTD from this measure and add in SUM then [Number of Records]

Doesn't Tableau already have built-in calculations for all this?

Any help or advice would be greatly appreciated.

• ###### 1. Re: How To:  Standard Deviation of a measure already being aggregated

Please attach sample data as twbx and clarify your expectation with actual value example.

Thanks

Shin

• ###### 2. Re: How To:  Standard Deviation of a measure already being aggregated

Attached Workbook Extract

• ###### 3. Re: How To:  Standard Deviation of a measure already being aggregated

HI Stephan,

It's quite difficult to speculate what you really need, but from below data set, I am guessing.

Defect (counting event number)  per Machine (= Serial No) by Day.

Then try to capture the distribution of above plot i month??

Plot is average (defects per (serial number x date)) per month by Serial Number.(average of multiple "date")

This orange is the avg of  (defects per (serial number x date)) per month (not considering machine average).

If you need defect count by machine by  month, the formula will be different (red and sheet9), but anyways,

I am not sure about the real expectations regarding what is the smallest unit (defect per unit = by day or month or whatever else) you want to get distributions...

Thanks,

Shin

1 of 1 people found this helpful
• ###### 4. Re: How To:  Standard Deviation of a measure already being aggregated

This is fantastic.  Your solutions have given me a few other ideas on which directions I can go with my data.  I really appreciate your help on this.

• ###### 5. Re: How To:  Standard Deviation of a measure already being aggregated

Sounds good.