Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am trying to reorder the legend and the order of stacked bars for this chart.
I added a new column with numbers to create custom sort order, then did sort by column "Custom Sort (Job related stress)". This method has worked for me before but with this data I keep getting this error message:
Is it something with the data? As far as I know there are no repeated values for the custom sort column vs job related stress column. I have "Less than once a week", "Once a week", "A few times a week", and "Almost every day". Is it picking up "Less than once a week" and "once a week" as the duplicated values? I have tried doing custom sort and removing "Once a week" but still got the same error message.
Solved! Go to Solution.
The job related stress column should be OK - it's what's in your "Custom Sort (Job related stress)" column that would be causing issues.
Here's how i would debug - create a simple table and put Job related stress (don't summarize) and distinct count of Custom Sort (Job related stress) in the table and sort by the count - this should help you find which specific values for Job related stress are causing issues. You can then fix the sort column to make all the values unique. Note - blank values will count towards "duplicate values" for the purposes of sorting.
The job related stress column should be OK - it's what's in your "Custom Sort (Job related stress)" column that would be causing issues.
Here's how i would debug - create a simple table and put Job related stress (don't summarize) and distinct count of Custom Sort (Job related stress) in the table and sort by the count - this should help you find which specific values for Job related stress are causing issues. You can then fix the sort column to make all the values unique. Note - blank values will count towards "duplicate values" for the purposes of sorting.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |