Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi All,
I am trying to rank a value field, but I am getting the rank as below.
Can Someone explain me what I am doing wrong here, how can I resolve this.
Thanks in advance!
Regards,
Solved! Go to Solution.
Hey,
this is because empty values (NULL) are treated as 0 (zero), for this reason there are a lot of rows ranked with the value 13.
This behavior is explained here:
https://msdn.microsoft.com/en-us/library/gg492185.aspx
If you want to avoid this, you have to make sure that rows with an empty value have to be filtered out.
Hope this helps
Hey,
this is because empty values (NULL) are treated as 0 (zero), for this reason there are a lot of rows ranked with the value 13.
This behavior is explained here:
https://msdn.microsoft.com/en-us/library/gg492185.aspx
If you want to avoid this, you have to make sure that rows with an empty value have to be filtered out.
Hope this helps
Hi TomMartens,
Thanks for your input,I am able to get the expected data except that my Rank is duplicated due to ties. Is there any
workaround to break the ties and get the rank in sequential order(38,39,40...)
@Anonymous
You can break ties using something similar to my post in this thread:
I think your measure will look something like this.
Rank with ties broken = RANKX ( TableForRanking, RANKX ( TableForRanking, [Primary Measure],, ASC ) + DIVIDE ( RANKX ( TableForRanking, PhysicalTable[Date], CALCULATE ( MAX ( PhysicalTable[Date] ) ), ASC ), ( COUNTROWS ( TableForRanking ) + 1 ) ) )
It might be easier for you to post more details on the table/measure names or a sample pbix file to get the code exactly right.
Regards,
Owen
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
88 | |
78 | |
57 | |
40 | |
39 |
User | Count |
---|---|
116 | |
82 | |
78 | |
48 | |
42 |