The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
)
)
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |