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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JFG1234
Frequent Visitor

Calculate benchmark average with filter by group

I am trying to add a field called "Benchmark" to the visual below (left).

The "Benchmark" field needs to be separated by Sex as can be seen in the right table (female = 11, male = 11.88).

 

The final output should be the first left table with "Benchmark" added; when female = 11 and when male 11.88.

 

 

JFG1234_4-1674179352918.png

 

When I add the field I have created it expands out the table and creates a series of empty records (i.e. Count of Year with blank values), but gets the benchmark correct.

 

JFG1234_3-1674179336448.png

 

This is the calculation I am using the calculate the benchmark. It should take the average of performance "Points" where the "Rank" is = 3 and account for Sex.

 

JFG1234_1-1674179294896.png

 

This is the model schema.

 

JFG1234_5-1674179413663.png

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@JFG1234 , Try Measure like

 

calculate(Average(Table[Points]), filter(allselected(Table) , Table[Rank] = 3 && Table[Sex]=max(Table[Sex])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Sex isn't in the same table as Points, it is connected by a many:1 relationship through the Athlete_ID as the last picture shows. Is it possible to do through the relationship?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.