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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.