Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowGet certified as a Fabric Data Engineer: Check your eligibility for a 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700. Get started
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)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
22 | |
17 | |
16 | |
11 | |
7 |
User | Count |
---|---|
26 | |
25 | |
12 | |
12 | |
12 |