Forum Discussion
How do I custom sort columns within a cluster bar chart?
- 5 years ago
Hi, trinas
Could you please tell me whether your problem has been solved?For now, there is no content of description in the thread.
As mentioned by sjrrkb123 , what you need is to sort the column 'phase' by column 'Pos' in 'column tools' . And the feature is available in 'data tab' rather than in 'report tab'.
Before:
After:
Please check my sample pbix file for more details.
Best Regards,
Community Support Team _ Eason
I tried that but for some reason it won't let me - this is what it shows:
and what the data is to the left:
Did it give an error message?
- trinas5 years agoRegular Visitor
Nope! No error message
- trinas5 years agoRegular Visitor
To clarify - I didn't get an error message but it didn't solve my problem
- sjrrkb1235 years agoHelper III
trinas I had this problem myself....I was not able to make the sorting dynamic but rather created a sort key in power query for your "Phase" column.
-it would be a custom column that says if [Phase] = "50% DD" then 1 else if [Phase] = "100% DD" then 2 else 3 end
-Note, this can be done using the conditional column option as well in Power Query.
Then, sort the column by the sort key using the "Sort By Column" option when selecting your column and looking that column tools in Power BI Desktop.Just a reminder, this will not be dynamic based on the $$ values
****EDIT: I looks like POS already is a sort key for you. I think you can skip the Power Query step and just use the sort column tool I put in the screenshot.