Forum Discussion
RankX Ties break issue
Hi Every one!
I have a issue with the client data ranking in breaking ties, i tried the multiple ways for breaking ties in power bi but unfortunately it is not going correct can you please guide to this.
in rank_2020 measure 56 is repeating. Thanks in advance.
- Anonymous5 years ago
Hi Anonymous
I think you can give a rank for transaction_details, add up rank1*10000+rank2 and build a new rank for this value.
NEW Value = VAR _RANK1 = RANKX(ALL(Data[transaction_details]),[M_NETSALESONLY],,DESC,Dense) VAR _RANK2 = RANKX(ALL(Data),CALCULATE(MAX(Data[transaction_details])),,ASC,Dense) RETURN _RANK1*10000+_RANK2New Rank = RANKX(ALL(Data[transaction_details]),[NEW Value],,ASC,Dense)My Test:
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- amitchandak
Super User
Anonymous , Try a measure like
new sales = [M_NETSALESONLY] + rand()/1000
use this in rank
- AnonymousNot applicable
Thanks Amit but the issue is still there
- AnonymousNot applicable
Hi Anonymous
I think you can give a rank for transaction_details, add up rank1*10000+rank2 and build a new rank for this value.
NEW Value = VAR _RANK1 = RANKX(ALL(Data[transaction_details]),[M_NETSALESONLY],,DESC,Dense) VAR _RANK2 = RANKX(ALL(Data),CALCULATE(MAX(Data[transaction_details])),,ASC,Dense) RETURN _RANK1*10000+_RANK2New Rank = RANKX(ALL(Data[transaction_details]),[NEW Value],,ASC,Dense)My Test:
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Anonymous It is working !!! Thanks for your support and effort.