Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
144 | |
72 | |
63 | |
52 | |
49 |
User | Count |
---|---|
208 | |
91 | |
62 | |
59 | |
56 |