Forum Discussion
Brotedo
4 years agoHelper I
Custom Sort for Matrix Column - Alphabetical but Move 1 Entry to End
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 P...
- 4 years ago
Hi Brotedo
Here is a sample file with the solution https://www.dropbox.com/t/UlPm1CBMkhWfRtnZRank 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 ) )
tamerj1
4 years agoCommunity Champion
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
)
)