March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I am using Median function for some fields. For two fields, the median value in excel is different than what I get in PowerBI. The one is excel is what I want. Seems like excel is ignoring null values while PowerBI is not. Do I need to change the way I use Median function in PowerBI to get the results that I get in excel?
Thanks
Solved! Go to Solution.
I think I got it:
MedScore = ROUND(
CALCULATE(
medianx(FILTER(vw_ABC, vw_ABC[Score1]<> BLANK()),
vw_ABC[Score1]) ,
TREATAS(VALUES('vw_Option'[StuName]),vw_ABC[IStuName])
),0
)
Thanks Cherry.
How can we ignore NULL values in the median function?
This is the formula I am using right now:
MedScore = ROUND(CALCULATE(medianx(vw_ABC,(vw_ABC[Score1])),
TREATAS(VALUES('vw_Option'[StuName]),vw_ABC[StuName])),0)
I think I got it:
MedScore = ROUND(
CALCULATE(
medianx(FILTER(vw_ABC, vw_ABC[Score1]<> BLANK()),
vw_ABC[Score1]) ,
TREATAS(VALUES('vw_Option'[StuName]),vw_ABC[IStuName])
),0
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
77 | |
58 | |
52 | |
45 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |