Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello!
I have a sorting problem i do not know how to solve. i get the error:
We can't sort the 'State' column by 'State Sort Order'. There can't be more than one value in 'State Sort Order' for the same value in 'State' Please choose a different column for sorting or update the data in 'State Sort Order'.
The problem im facing here is my data looks like:
ID | State | State Category | State Sort Order |
1 | Removed | ||
2 | Committed | InProgress | 2 |
3 | In Progress | InProgress | 2 |
4 | In Progress | InProgress | 2 |
5 | Approved | InProgress | 2 |
6 | Approved | Proposed | 1 |
7 | Approved | Proposed | 1 |
8 | Done | Completed | 3 |
9 | done | Completed | 3 |
10 | Done | Completed | 3 |
i made bold what goes wrong. I give the state sort order a value based on the State Category. I tried doing this on 2 different ways, but ofcourse the same outcome.
1st attempt is a column with:
State Sort Order = SWITCH ( 'All items - Tasks'[State Category], "Proposed", 1, "InProgress", 2, "Completed", 3, "Resolved", 4, 5 )
The second one is a new table
1 | Proposed |
2 | InProgress |
3 | Completed |
4 | Resolved |
5 |
and a column with
State Sort Order = RELATED( 'State Sort Order'[ID]
but both come up with ofcourse the same Sort column.
My idea is to first sort on the Sort column, and if the values are the same sort them on alphabetical order.
Anyone?
Solved! Go to Solution.
i decided to give up on sorting by State Category and sorted on state itself. Thanks of the suggestions.
Hi @Anonymous ,
You can consider to create a custom sort table and link to raw table, then use related sort table fields as sort order:
Regards,
Xiaoxin Sheng
As i've shown above i've tried this, but this does not work.
i decided to give up on sorting by State Category and sorted on state itself. Thanks of the suggestions.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |