Forum Discussion
Soof1234
3 years agoHelper I
Make continuous ranking if values are the same
Hi, Well known issue, but the related posts mostly contain solutions based on a column by adding an index. My problem however, is that I created the ranking based on a measure. I created a ran...
- 3 years ago
Hi,
Thank you for your message, and please check the below picture and the attached pbix file.
Rank: = VAR _table = ADDCOLUMNS ( ADDCOLUMNS ( ALL ( Intakes[Sourcers.Title] ), "@rankone", CALCULATE ( RANKX ( ALL ( Intakes[Sourcers.Title] ), [Intakes:],, DESC ) ), "@ranktwo", CALCULATE ( RANKX ( ALL ( Intakes[Sourcers.Title] ), CALCULATE ( MAX ( Intakes[Sourcers.Title] ) ), , ASC ) ) ), "@newindex", [@rankone] * 100 + [@ranktwo] ) VAR _newtable = ADDCOLUMNS ( _table, "@newrank", RANKX ( _table, [@newindex],, ASC ) ) RETURN IF ( HASONEVALUE ( Intakes[Sourcers.Title] ), MAXX ( FILTER ( _newtable, Intakes[Sourcers.Title] = MAX ( Intakes[Sourcers.Title] ) ), [@newrank] ) )
Jihwan_Kim
3 years agoSuper User
Hi,
I am not sure how your data model looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your data model.
Rank expected result: =
COUNTROWS (
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE ( ALL ( Data ), Data[Name], Data[Qty] ),
ORDERBY ( Data[Qty], DESC, Data[Name], ASC )
)
)
SaiChand
3 years agoNew Member
Greate Job Jihwan_Kim,
It worked for me, really appreciate your work.