Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a fairly large table with many columns. One of these columns is a list of musical artists, of which their name can appear many times (hundreds in fact). I am attempting to rank the artist based on this count but the RANKX function I've come up with is ranking everything at a "1". Some of the counts may be tied and so a dense rank would be preferable I think.
Function I used:
Rank Artist = RANKX(ALLSELECTED(SpotifyExtended[artist_name]),COUNT(SpotifyExtended[artist_name]))
Example table:
| artist_name |
| Bonobo |
| Bonobo |
| Bonobo |
| Bonobo |
| Bonobo |
| Bonobo |
| Emancipator |
| Emancipator |
| Emancipator |
| Emancipator |
| Emancipator |
| Bluetech |
| Bluetech |
| Bluetech |
| Bluetech |
| Gramatik |
| Gramatik |
| Gramatik |
| Shlohmo |
| Shlohmo |
| Porn Sword Tobacco |
This is what I'd like the end result to look like:
| Artist | Count | Rank |
| Bonobo | 6 | 1 |
| Emancipator | 5 | 2 |
| Bluetech | 4 | 3 |
| Gramatik | 3 | 4 |
| Shlohmo | 2 | 5 |
| Porn Sword Tobacco | 1 | 6 |
Solved! Go to Solution.
Hi @hobosapien
You need 2 measures
Count = COUNTROWS('DataTable')
Rank = RANKX(ALL('DataTable'[artist_name]), [Count])
Regards
Phil
Proud to be a Super User!
Hi @hobosapien
You need 2 measures
Count = COUNTROWS('DataTable')
Rank = RANKX(ALL('DataTable'[artist_name]), [Count])
Regards
Phil
Proud to be a Super User!
Doesn't seem to work on my table for some reason, it still lists a vast majority of them at a 1.
HOWEVER, I rebuilt the table using just the list of artists (no other columns) and it worked.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.