Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ahmed1997
Frequent Visitor

Calculate STDEV using absolute cell reference

ahmed1997_0-1656520143189.png

I have this data set where i need to calculate the standard deviation based on the AVG column. What I would like to know is whether it is possible for me to have absolute cell reference for the AVG column, that way my answer for the STDEV would be a fixed value for all of the entries. I have used a measure to calculate the AVG.

 

Any help or tips will be really appreciated.

Thanks in Advance.

 

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @ahmed1997 ,

 

There are 4 standard deviation functions in DAX, STDEV.P, STDEV.S, STDEVX.P, STDEVX.S. If your data represents the entire population, use .P version, otherwise if it is a sample, use the .S version. 

Try like below:

STM = 
CALCULATE(
    STDEV.P('Table'[Avg]),
    ALLEXCEPT('Table','Table'[Month ])
)

vhenrykmstf_0-1656924493105.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-henryk-mstf 

 

So I have calculated the STD and the numbers are showing okay. 

However, just to cross check I exported the Data onto Excel to see if I get the same result there using STD. Unfortunately, in Excel my STD Value is different compared to power bi.

 

I've attached a screenshot of the measure, and I've used the STDEVX.S as this is a sample from the population.

 

ahmed1997_0-1657095761058.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.