Forum Discussion
ace_SB
8 years agoFrequent Visitor
Median PowerBI vs Excel
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 ignorin...
- 8 years ago
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
)
v-piga-msft
8 years agoResident Rockstar
- ace_SB8 years agoFrequent Visitor
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)- ace_SB8 years agoFrequent Visitor
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
)