March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I have a chart per month and over three years. When I want to order them so months appear from Jan to December, I am getting an error. How else can I fix it?
Solved! Go to Solution.
There are a couple of ways to do this. One easy, the other complex.
From your screenshot, you are clearly using a column for the X-axis that Power BI interprets as text which is why Power BI sorts it alphabetically. This is likely because you created a calculated column from your Date column using the FORMAT() function which transforms the Date to text. This is not best practice (see the first option below).
The first option is to simply use a Date column of your table as the X-axis with the formatting set to however you want it displayed in the GUI. This will maintain the Date type and Power BI will then order by date versus alphabetically in your screenshot. I strongly encourage this solution before pursuing the next.
The second involves creating a sort column that matches the granularity precisely and sorting the column that Power BI is interpreting as text on the newly created sort column. This requires special care though because Power BI is buggy. Knowing how to do this however is important when one needs to custom sort actual text/labels.
Awesome! Glad to see you got it working. Unfortunately, this behavior is not well documented and nearly every new developer encounters it at some point, only to find themselves endlessly struggling especially because of the unresolved bugs (and I speak from experience).
There are a couple of ways to do this. One easy, the other complex.
From your screenshot, you are clearly using a column for the X-axis that Power BI interprets as text which is why Power BI sorts it alphabetically. This is likely because you created a calculated column from your Date column using the FORMAT() function which transforms the Date to text. This is not best practice (see the first option below).
The first option is to simply use a Date column of your table as the X-axis with the formatting set to however you want it displayed in the GUI. This will maintain the Date type and Power BI will then order by date versus alphabetically in your screenshot. I strongly encourage this solution before pursuing the next.
The second involves creating a sort column that matches the granularity precisely and sorting the column that Power BI is interpreting as text on the newly created sort column. This requires special care though because Power BI is buggy. Knowing how to do this however is important when one needs to custom sort actual text/labels.
Thanks a lot - it worked!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
126 | |
85 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |