Forum Discussion
Sorting row or column values in a specific order
Re. Part #1
I changed the Sort_LOB calculated column to the SWITCH dax, then I selected LOB and sorted by Sort_LOB, and encountered and error message - screenshot attached.
is [Lob] a measure or a Column?
You could also create a new table (Sort_Lob) to do the sorting.
| LOB | Sort_LOB |
| Accounts | 1 |
| Esc Accounts | 2 |
| Billing | 3 |
| Esc billing | 4 |
| Tech | 5 |
| Esc Tech & hardware | 6 |
Then you relate this table to the Employee_Team table you want to sort, and use this Sort_Lob table in the report.
- Anonymous6 years agoNot applicable
[LOB] is a field/column from a SQL table.
- Anonymous6 years agoNot applicable
Per your suggestion, I created a new table (Sort_LOB) with 2 columns:
LOB
Sort_LOBThen I mapped the relationship between Employee table and this new table using the field 'LOB'.
For this solution, would I then put the LOB field and Sort_LOB fields (from new table) in the visualization, and then sort by Sort_LOB?
Because I did that, and LOB still wasn't sorted accordingly.Thanks.
- mjantune6 years agoRegular Visitor
Anonymous wrote:Per your suggestion, I created a new table (Sort_LOB) with 2 columns:
LOB
Sort_LOBThen I mapped the relationship between Employee table and this new table using the field 'LOB'.
For this solution, would I then put the LOB field and Sort_LOB fields (from new table) in the visualization, and then sort by Sort_LOB?
Because I did that, and LOB still wasn't sorted accordingly.Thanks.
Can you send an screenshot or something? Because that has always worked for me in the past. Also, in the new table you could sort the LOB field by the Sort_LOB field, and then just use the LOB field from the new table in the visualization, also check if its sort descending or sort ascending (just in case).