Forum Discussion
SQRT error
- 8 years ago
Dear all,
I need some help.
I am trying to calculate the margin of error for a set of surveys.
My formula is as follows:
1.96*sqrt( ( p*(1-p)/n ) * ( (N-n)/(N-1) ) )
I cannot get the SQRT function to work in dax so I have split my work up to a series of steps to aid analysis. My data now looks like this. my measures are in bold and I have included the calculation for each one.
I now cannot get the final step of the equation to work.
MOE = SQRT(FullDataset[MOE a]) but this does not work. I get an error. Can I get a square root of a measure? Or could it be due to a few infinity results in MOE a? There is also a NaN result. Woudl this make a difference?
It seemed like this was going to be so straightforward but I am very new to this and I just cannot figure this out.
| Course Code | N | n | MOE P ( ( p*(1-p)/n ) | FPC ( (N-n)/(N-1) ) ) | MOE a ( ( p*(1-p)/n ) * ( (N-n)/(N-1) ) ) |
| MH1231 | 4151 | 941 | 0.0001 | 0.7735 | 0.00008 |
| AC3583 | 610 | 478 | 0.0002 | 0.2167 | 0.00004 |
| MH1131 | 1671 | 400 | 0.0002 | 0.7611 | 0.00018 |
| MF1525 | 1555 | 400 | 0.0002 | 0.7432 | 0.00017 |
| AC1511 | 2313 | 388 | 0.0002 | 0.8326 | 0.0002 |
| AC1501 | 1740 | 379 | 0.0002 | 0.7826 | 0.00019 |
Any help would be appreciated