Forum Discussion
Chris_23
Helper II
1 year agoRANKX Measure should ignoring Higher-Level Context for Independent Ranking
Hello everyone, I have an issue with a RANKX measure. I want to create a ranking on the second level based on a measure, and this works well (1) for only two Levels: [Name] and [Supervisor]: ...
- Anonymous1 year ago
Hi Chris_23
Please try this:
Rank2 = VAR _vtable = VAR _vtable = SUMMARIZE ( FILTER ( ALLSELECTED ( 'Master' ), 'Master'[Sum] <> BLANK () ), Master[Name], "_SUM", [Sum] ) RETURN ADDCOLUMNS ( _vtable, "_rankx", RANKX ( _vtable, [_SUM],, ASC ) ) VAR _currentName = SELECTEDVALUE ( Master[Name] ) RETURN IF ( ISINSCOPE ( Master[Name] ), MAXX ( FILTER ( _vtable, 'Master'[Name] = _currentName ), [_rankx] ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Chris_23
Helper II
1 year agoHi Anonymous
thanks for your response.
However, that’s not quite the result I’m aiming for.
Ultimately, I’d like to achieve a ranking that is independent of the first level, Region:
Kind regards
Chris
- Anonymous1 year agoNot applicable
Hi Chris_23
Please try this:
Rank2 = VAR _vtable = VAR _vtable = SUMMARIZE ( FILTER ( ALLSELECTED ( 'Master' ), 'Master'[Sum] <> BLANK () ), Master[Name], "_SUM", [Sum] ) RETURN ADDCOLUMNS ( _vtable, "_rankx", RANKX ( _vtable, [_SUM],, ASC ) ) VAR _currentName = SELECTEDVALUE ( Master[Name] ) RETURN IF ( ISINSCOPE ( Master[Name] ), MAXX ( FILTER ( _vtable, 'Master'[Name] = _currentName ), [_rankx] ) )The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- Chris_231 year ago
Helper II
Thank you very much for the great solution