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
Anonymous
Not applicable

Filter in DAX formula: only use regular persons to calculate the total average

Hi, 

 

I'm keeping track of the attendance of my sport sessions. I would like to have an overview of everyone's attendance. But to calculate the overall average I only want to take into account individuals who effectively belong to the group in question. 

 

Some example data: 

 

Namesessionspresentattendancegroupprimary group
John10211%AB
Arthur1027372%AA
Chris1026059%AA
Luke10222%AB
David1028886%AA

 

The overall average would be 44%. but because some individuals only participate occasionally in this group they bring the average down tremendously. So I just want to calculate the average of those whose group is equal to their origin group (Arthur, Chris and David in this case). The result would be 72%. 

 

How can I filter this in a DAX formula? (The primary group column is not present in this table but stands somewhere else!) 

 

 

Thank you 

3 REPLIES 3
JorgePinho
Solution Sage
Solution Sage

Is the table where the primary group column is connected to the one with the group?

Anonymous
Not applicable

yes

I would recommend you to create a flag (1 if groups match, 0 if don't match) calculated column and then use CALCULATE to make an average considering a filter by that column.

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!

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.

Top Solution Authors
Top Kudoed Authors