Forum Discussion
kirbynguyen
5 years agoHelper II
Standard Deviation DAX
Hello, I am trying to calculate standard deviation from my data: Product Profit Count Total 1 100 5 500 1 200 4 800 1 300 3 900 1 400 1 400 2 100 7 700 ...
- 5 years ago
Well, I think I figured it out. Here's the solution:
prodtop = POWER('Table'[Profit] - 'Table'[prodmean], 2) * 'Table'[Count]prodtoptotal = CALCULATE(SUM('Table'[prodtop]), ALLEXCEPT('Table', 'Table'[Product]))variance = 'Table'[prodtoptotal] / 'Table'[prodcount]std = SQRT('Table'[variance])I think I can consolidate this into fewer columns so I'll work on that. Thanks for the help 😁
kirbynguyen
5 years agoHelper II
Okay, I didn't do it by hand, but I plugged the numbers into a calculator 😛
kirbynguyen
5 years agoHelper II
Well, I think I figured it out. Here's the solution:
prodtop = POWER('Table'[Profit] - 'Table'[prodmean], 2) * 'Table'[Count]
prodtoptotal = CALCULATE(SUM('Table'[prodtop]), ALLEXCEPT('Table', 'Table'[Product]))
variance = 'Table'[prodtoptotal] / 'Table'[prodcount]
std = SQRT('Table'[variance])
I think I can consolidate this into fewer columns so I'll work on that. Thanks for the help 😁