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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX Formula to Count Values and Calculate Standard Deviation on these Counts

Hi,

 

I am trying to calculate standard deviations within groups for the values. Problem is that these values are initially prices, I need the count for the prices, ie, how many price observarions were in certain municipalities, and then apply STDEV on them against average counts of price observations for the region, where the municipalities fall.

 

I can not seem to get hold on the count values of prices to apply further calculations to them, STDEV or anything.

 

In Excel this is quite easy, I am attaching the sample file ST DEV on COUNTS with edit permission so that anyone can explore the forumlas, but in Power BI Desktop I was unable to recreate the same result. I am kind of intermediate level user, but still could not make it work.

 

Your help would be much appreciated.

 

Best,

Levan

4 REPLIES 4
quentin_vigne
Solution Sage
Solution Sage

Hi @Anonymous

 

If you use CALCULATE(Count(YourTable[Price]);YourTable[MunicipalityName]=MunicipalityName) does it work ? 

 

- Quentin

 

 

Anonymous
Not applicable

Also, does not work new calculated column with same formula.

Screenshot 2018-05-25 15.33.18.png

Anonymous
Not applicable

eqeq = STDEV.P(_2017[CountSellingPricesCOLUMN])

Anonymous
Not applicable

Hi @quentin_vigne,

 

I used this formula to obtain counts, but then I can't use these values to apply STDEV formula.

CountSellingPrice = CALCULATE(COUNT(_2017[Value]),FILTER(_2017,_2017[Attribute]="Price: Local"),FILTER(_2017,_2017[Value]>0))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.