Forum Discussion
ranking on text column
- 2 years ago
Hi Jessica_17
Try to use the measure :rank_text = RANKX(ALLSELECTED('Table'[batch]),CALCULATE(max('Table'[batch])),,ASC)Result :
pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly - 2 years ago
Hi Jessica_17
Did you download a pbix and folllowed my steps?
If yes , please share link to the pbix of yours and i will try to help.
- 2 years ago
you can do this in power query.
it will be better this way - 2 years ago
Hi Jessica_17
What is the ranking's purpose?
If the rank should be static, you can use Ahmedx's suggestion.
If the table has duplicate batches.
You can duplicate the table, remove all unnecessary columns, and add an index column (with power query like in the attached images.
If the batches are unique you can just add an index.create a relationship
And use the index as a needed rank (note that you have duplicates)
if you need it as a dynamic measure :
Use a measure
rank_dynamic = RANKX(all('Table'),CALCULATE(max('Table'[batch])),,ASC)New pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Anonymous2 years ago
Hi Jessica_17 ,
You can create a measure as below to get it, please find the details in the attachment.
Rank = RANKX ( ALL ( 'Table1' ), CALCULATE ( MAX ( 'Table1'[Batch] ) ),, ASC, DENSE )Best Regards
- 2 years ago
hi, Jessica_17
try below for measure formulausing measure = RANK(DENSE,ALL('Table'[Batch],'Table'[Jobs]),ORDERBY('Table'[Batch],ASC,'Table'[Jobs],ASC))for column try below
using column = RANK(DENSE,ALL('Table'[Jobs],'Table'[Batch]),ORDERBY('Table'[Batch],asc,'Table'[Jobs],asc))If this post helps, then please consider Accept it as the solution to help the other members find it
- 2 years ago
to know how to do this watch my video
yes it will work
HI Ahmedx
Thanks , it worked