Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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:
Name | sessions | present | attendance | group | primary group |
John | 102 | 1 | 1% | A | B |
Arthur | 102 | 73 | 72% | A | A |
Chris | 102 | 60 | 59% | A | A |
Luke | 102 | 2 | 2% | A | B |
David | 102 | 88 | 86% | A | A |
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
Is the table where the primary group column is connected to the one with the group?
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.