Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Here is the Rank Measure I used for the TotalPlsRank:
Is this even possible...I can't firgure this out...I've watched countless videos and numberous webpages....still nothing
I even tried adding 2 ranks (Total Pieces Rank & Total PLS Rank)...It worked; however, it repeated when the total pieces duplicated...I'm lost....HELP....PLEASE
Solved! Go to Solution.
Hi @NLewis ,
You could create the following measure:
TOTAL = IF(HASONEVALUE(PLS_DATA[Customer]),1,0)
Final Rank1 =
DIVIDE (IF(HASONEVALUE(PLS_DATA[Customer]),RANKX(ALL(PLS_DATA[Customer]),[TotalDeliveryScans],,DESC,Dense)),CALCULATE(COUNTROWS(PLS_DATA),FILTER(ALL(PLS_DATA),[TOTAL]>0) )
)
FINALRANK = IF(HASONEVALUE(PLS_DATA[Customer]),RANKX(ALL(PLS_DATA[Customer]),[PLSRanking]+[Final Rank1],,ASC,Dense))
Final get the below :(it will rankx first base on totalpls ,if with the same totalpls ,then rank base on TotalDeliveryScans)
REFER:https://community.powerbi.com/t5/Desktop/How-to-Rank-a-list-based-on-2-values-double-rankX/m-p/44008
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @NLewis ,
You could create the following measure:
TOTAL = IF(HASONEVALUE(PLS_DATA[Customer]),1,0)
Final Rank1 =
DIVIDE (IF(HASONEVALUE(PLS_DATA[Customer]),RANKX(ALL(PLS_DATA[Customer]),[TotalDeliveryScans],,DESC,Dense)),CALCULATE(COUNTROWS(PLS_DATA),FILTER(ALL(PLS_DATA),[TOTAL]>0) )
)
FINALRANK = IF(HASONEVALUE(PLS_DATA[Customer]),RANKX(ALL(PLS_DATA[Customer]),[PLSRanking]+[Final Rank1],,ASC,Dense))
Final get the below :(it will rankx first base on totalpls ,if with the same totalpls ,then rank base on TotalDeliveryScans)
REFER:https://community.powerbi.com/t5/Desktop/How-to-Rank-a-list-based-on-2-values-double-rankX/m-p/44008
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
@v-luwang-msft I'm absoulutly loving this formula...can i throw a FILTER(ALLSELECTED(DATES TABLE,[DATE]) somewhere...I noticed the COUNTROWS; therefore, if I select certain dates in the filter, the Rank starts at 2 (due to all rows not having data for certain dates)
Hi @NLewis ,
In my opinion, it is possible. In my own case, I am used to using all if I don't have a slicer, and allselected if I do.
Best Regards
Lucien
THANKS! 🙂 It works...
Thanks to all that took the time to help me out!
Hi,
Does this measure work?
PLSRanking =
IF(HASONEVALUE(PLS_DATA[Customer]),RANKX(ALL(PLS_DATA[Customer]),[TotalPieces],,DESC,Dense))
Hope this helps.
In my mind I'm thinking of something like this (I could be wrong)
PLS_Rank =
IF [TotalPLSRank] = [AnotherRank]
VAR MaxTotalPieces (of the above...but total pieces are in a different column)
Add .05 to [AnotherRank] that has the greater value
Then take the Rank of that
I feel like this dont make any sense...I feel like I'm speaking another language...not english...geeeshhh
https://www.dropbox.com/s/wfbleuyf31h96j8/Rank%20Again.pbix?dl=0
Here is a copy of my file (a clean version). I've tried so many different ways...I really give up...I've been at this for 4 months...maybe I need to go back to school for coding...or I'll just have to keep adjusting in Excel...this is unreal
I really do appreciate all your help
I attached a copy of a clean version that I need to rank...you would not believe how long...and how many different ways....I'm 3 months in...I'm at my wits end...or I'll just keep adjusting it in Excel...or go back to school for coding...lol
https://www.dropbox.com/s/wfbleuyf31h96j8/Rank%20Again.pbix?dl=0
And thanks again 🙂
Hello there @NLewis ! I have encountered a similar problem in the past and I resorted to these link for help:
https://community.powerbi.com/t5/Desktop/Drill-down-in-RANKX-on-a-matrix-visual/m-p/2061285#M769688
https://community.powerbi.com/t5/Desktop/Rank-values-without-duplicate-ranking/m-p/702224
https://community.powerbi.com/t5/Desktop/Rank-distinct-values-for-ties/td-p/194301
Hope they can help you as well!
Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes
None of these helped...I keep coming out with the same results...I tired breaking-ties by adding a random number to the rank...that's not working...I was also trying some variables; however, I can't seem to get this together....
Hi @NLewis, try this then!
Ranking =
var _sales = SUM( 'Rank'[Value] )
return
IF(
HASONEVALUE('Rank'[Attribute]),
RANKX(ALL('Rank'[Attribute]),
_sales,
,
DESC,
Skip )
)
I hope this answer solves your problem! If you need additional help, please tag me in your response.
If my answer provided you with a solution, mark it as a solution ✔️ or give it a kudoe 👍
Thank you!
Best regards
Gonçalo Geraldes
Hello @NLewis , try this then!
Ranking =
var _sales = SUM( 'Rank'[Value] )
return
IF(
HASONEVALUE('Rank'[Attribute]),
RANKX(ALL('Rank'[Attribute]),
_sales,
,
DESC,
Skip )
)
Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!
Best regards,
Gonçalo Geraldes
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |