Forum Discussion
How do I sort columns chronologically in stacked column chart?
- 4 years ago
Hi james_wood ,
What you can do is create a MONTH-YEAR column in Power BI using your DATE column.
Check this article on how to get this Month-Year column:
https://radacad.com/generate-year-and-month-combinations-in-power-bi-report-using-dax
Next I created stacked bar chart with the following information:
You can see that at the top stack I see the one for Jan-2019, though I want the latest Month as the top stack which is Mar-2019.
So just sort your legend as shown below:
So when I did a sort on my LEGEND, I can see the latest month-year appearing as the top stack on the chart.
Let me know if this helps.
Thanks,
Pragati
Hi james_wood ,
On Stacked Column chart I see a LEGEND sort option:
What version of Power Bi are you using?
I am using the latest December 2021 updated version.
Sort Legend is a new feature in Power BI. So this could be a version issue at your end.
But I am glad the issue resolved for you. Do mark my suggestion as a solution so that it can help others on the forum as well.
Thanks,
Pragati
Marked as solution. Thanks again for the help. i'm using August 2021. Tried updating but don't have IT permission. That;s something for me to fix.