Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Vandergledison
Helper III
Helper III

How to untie a RankX expression?

Hi everyone,

after getting a great help of @harshnathani on building my Projects/products scoring system i have a new problem.

i will have a scoring system where im ranking each parameter (sales, CM1, Risk, etc) based on %iles of each parameter.

in the end, i will have a simple algorithm with the respective weights for each parameter, resulting in a total Score.

From the total score, i created a RankX function in order to have a Piority list from 1 til XXX.

As some of the total score can be identical, RankX is showing several duplicates.

 

apagarRank_test = Rankx(allselected(Sales[Project No.]),[Rank on %ile],,desc)
 
Project No.Total Sales by Project NoRank on %ileapagarRank_test
XXX171001238.9351
XXX115001219.7451
XXX152002153.6151
XXX152001146.1244
XXX111001131.1244
XXX252501123.9344
XXX111005103.237
XXX11300193.537
XXX15600486.1437
XXX11300263.86210
XXX11100259.18210
XXX11100452.33210
XXX11150137.12113
XXX17150129.7113
XXX3545017.93113
 

I saw differen complex ways of doing by adding for ex. RAND and other ways which for me as  a total noob is complicated.

any way of doing as simple as possible? would be possible to add "total sales by proj no" as a second parameter to untie the final result? i just need a prio with 1,2,3,4 etc.. pbix file bellow

Thanks for any help

PBIX File 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You could multiply the rank by 1000 and subtract the total sales. The lowest number would still be the winner. 

Regards

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

You could multiply the rank by 1000 and subtract the total sales. The lowest number would still be the winner. 

Regards

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


that was a quick one 🙂

im wondering if would be possible to do it without workarounds.. the DAX should include something for this..

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.