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! Learn more
I have a table with multiple entries, and I need a custom sort that keeps the alphabetical order, but always moves 'Other' to the end. So this:
| Data |
Apple |
| Banana |
Orange |
| Other |
| Pear |
| Squash |
Should become this:
| Data |
Apple |
| Banana |
| Orange |
| Pear |
| Squash |
| Other |
Solved! Go to Solution.
Hi @Brotedo
Here is a sample file with the solution https://www.dropbox.com/t/UlPm1CBMkhWfRtnZ
Rank Measure =
VAR SelectedData = ALLSELECTED ( Table1[Data] )
VAR CurrentData = SELECTEDVALUE ( Table1[Data] )
RETURN
IF (
CurrentData = "Other",
COUNTROWS ( SelectedData ) + 1,
RANKX (
SelectedData,
CALCULATE ( SELECTEDVALUE ( Table1[Data] ) ),,
ASC,
Dense
)
)
Hi @Brotedo
Here is a sample file with the solution https://www.dropbox.com/t/UlPm1CBMkhWfRtnZ
Rank Measure =
VAR SelectedData = ALLSELECTED ( Table1[Data] )
VAR CurrentData = SELECTEDVALUE ( Table1[Data] )
RETURN
IF (
CurrentData = "Other",
COUNTROWS ( SelectedData ) + 1,
RANKX (
SelectedData,
CALCULATE ( SELECTEDVALUE ( Table1[Data] ) ),,
ASC,
Dense
)
)
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.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |