Forum Discussion
ace_SB
8 years agoFrequent Visitor
Median Measure using Distinct Values
Hi All, I have a dax formula, see below, to calculate Median. It uses the scores for only selected students and ignores nulls. What I need to do is use distinct values for Score1 while calculatin...
- 8 years ago
Hi ace_SB
Try this
MedScore = ROUND ( CALCULATE ( MEDIANX ( FILTER ( VALUES ( vw_ABC[Score1] ), vw_ABC[Score1] <> BLANK () ), vw_ABC[Score1] ), TREATAS ( VALUES ( 'vw_Option'[StuName] ), vw_ABC[IStuName] ) ), 0 ) - 8 years ago
Actually this works. Thanks a lot.
Zubair_Muhammad
8 years agoCommunity Champion
Hi ace_SB
Try this
MedScore =
ROUND (
CALCULATE (
MEDIANX (
FILTER ( VALUES ( vw_ABC[Score1] ), vw_ABC[Score1] <> BLANK () ),
vw_ABC[Score1]
),
TREATAS ( VALUES ( 'vw_Option'[StuName] ), vw_ABC[IStuName] )
),
0
)
ace_SB
8 years agoFrequent Visitor
Actually this works. Thanks a lot.