Forum Discussion
Rank in Direct Query to sort
- Anonymous3 years ago
Hi harshagraj ,
As far as I know, Power BI doesn't support us to sort values in same legend with different groups at the same time.
Here I have a workaround. You need to add [USER_DN] in Y-axis as level2 and add Rank measure into Tooltip.
Measure:
Rank_Module = MAX(USER_RATING_VIEW[Module]) &""& RANKX( CALCULATETABLE( VALUES(USER_RATING_VIEW[USER_DN]), ALLSELECTED(USER_RATING_VIEW[USER_DN])), CALCULATE([Manager Rating]))Sort axis by [Rank_Module] measure. Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi harshagraj ,
As far as I know, Power BI doesn't support us to sort values in same legend with different groups at the same time.
Here I have a workaround. You need to add [USER_DN] in Y-axis as level2 and add Rank measure into Tooltip.
Measure:
Rank_Module =
MAX(USER_RATING_VIEW[Module])
&""&
RANKX(
CALCULATETABLE(
VALUES(USER_RATING_VIEW[USER_DN]),
ALLSELECTED(USER_RATING_VIEW[USER_DN])),
CALCULATE([Manager Rating]))
Sort axis by [Rank_Module] measure. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.