Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to calculate a mean for an examination sitting but finding the average of values not including the value itself in dax.
Any help would be great.
To illustrate:
| subject | sitting | mark | "average" |
| maths | summer 2023 | 60 | (70+80+90+50)/4 |
| french | summer 2023 | 70 | (60+80+90+50)/4 |
| english | summer 2023 | 80 | (60+70+90+50)/4 |
| biology | summer 2023 | 90 | (60+70+80+50)/4 |
| history | summer 2023 | 50 | (60+70+80+90)/4 |
Solved! Go to Solution.
HI, @IHam
Measure 2 =
var a = CALCULATE(SUM(sub[mark]),sub[subject]<>MAX(sub[subject]))
var b =CALCULATE(DISTINCTCOUNT(sub[subject]),sub[subject]<>MAX(sub[subject]))
return
DIVIDE(a,b)
Many thanks to both of you - they both work but the second solution is the one that seems to match my set-up.
HI, @IHam
Measure 2 =
var a = CALCULATE(SUM(sub[mark]),sub[subject]<>MAX(sub[subject]))
var b =CALCULATE(DISTINCTCOUNT(sub[subject]),sub[subject]<>MAX(sub[subject]))
return
DIVIDE(a,b)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 14 | |
| 8 | |
| 8 | |
| 8 |