Forum Discussion
Sort by error, duplicate values where there appear to be none
- Anonymous2 years ago
As it happens I fixed things. Looks like it was just a Power BI bug - restarting has removed the error. Thanks for your help anyway!
Please follow the steps below to have it work. Adjust it accordingly.
Step 1
Create a Custom Table with all the category either manually in Power Query or Summarize Table.
Create a new column beside and provide the number in the order you want to arrange.
Step 2
Create a relationship between the column in actual table to the custom sort table
Step 3
Create a column in Actual table with an expression.
Sort order = RELATED(CustomSortTable[Sort])
Step 4
Select the column you want to sort, and a “Column Tools” menu bar will appear at the top. Now Select the “Sort by column” and select the sort order column.
Hi Kaviraj,
That is the setup I have, the field [BucketSort] in the image above is pulled in from another table with RELATED. I also tried using SWITCH within the calculated column, which also didn't work.
- Kaviraj112 years ago
Solution Sage
Would you able to share the pbix file or a sample file?
- Anonymous2 years agoNot applicable
As it happens I fixed things. Looks like it was just a Power BI bug - restarting has removed the error. Thanks for your help anyway!