cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FergalK Regular Visitor
Regular Visitor

DAX STDEV.P giving wrong value

Hi

I have a formula in my Tabular SSAS model to calc. the Std. Deviation as follows: 

 

RMAQtyStdDev:=CALCULATE (STDEV.P(drct_rtns[rma_rcpt_qty]  ), ALLSELECTED(drct_rtns))

 

..but it is giving the wrong value (8) the correct value (when using Excel formula on my pivot table "=STDEV.P(B5:B101)") is 15.

I can't understand why DAX / SSAS Tabular is giving me the wrong value.

 

Appreciate any/all help!!!

Thanks,

Fergal

 

below are the values upon which the StdDev is being calculated:

9
8
13
24
30
3
4
18
21
92
10
15
23
10
16
10
12
5
9
6
9
10
4
12
3
2
6
8
3
4
3
3
1
2
3
3
3
1

 

1 ACCEPTED SOLUTION

Accepted Solutions
FergalK Regular Visitor
Regular Visitor

Re: DAX STDEV.P giving wrong value

I have rewritten my source query to combine both columns into a single column - issue was that zeros in other column were causing inciorrect average to be calculated

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: DAX STDEV.P giving wrong value

Hi FergalK,

 

Couldn't reproduce your issue. The STDEV.P works well on my side. 

Capture.PNG  

 

Regards,

Jimmy Tao

FergalK Regular Visitor
Regular Visitor

Re: DAX STDEV.P giving wrong value

Hi Jimmy

Thanks for the reply, it does seem strange that it does not work correctly for me.

The only real difference is that you are using the formula in PowerBI and I am using it in SSAS tabular model but they should yield the same value.

I am wondering if it is not being calculated correctly in my pivot table because it does not recognise the filters correctly? But note thatr the Stdev value does actually change when I change a filter value in the pivot table, so it does seem like it acknowledges the filter values

 

Fergal

Highlighted
FergalK Regular Visitor
Regular Visitor

Re: DAX STDEV.P giving wrong value

Actually I think I may know what the issue is, it seems like the STDEV is including zero values too - how could I alter for formula to remove zeros from the STDEV calc?

thanks!

 

RMAQtyStdDev:=CALCULATE (STDEV.P(drct_rtns[rma_rcpt_qty]  ), ALLSELECTED()  )

FergalK Regular Visitor
Regular Visitor

Re: DAX STDEV.P giving wrong value

I have rewritten my source query to combine both columns into a single column - issue was that zeros in other column were causing inciorrect average to be calculated

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)