Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
)
)