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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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