This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I am trying to sort a column called MOnth Year Num. How can I create a column to sort it?
I have a Bar chart that shows the last 3 months. So I want to sort that column so that October 2022 comes fast.
Solved! Go to Solution.
Hi,
One of ways to create a sort column for the Month Year Num column is to create a ENDOFMONTH column by using a DATE column and EOMONTH DAX formula.
EOMONTH function (DAX) - DAX | Microsoft Learn
I hope this helps.
@Anonymous,
you can create a Date_start column as below.
then create a copy of the "month year num" column and use the Date_start column to sort. We create the copy of the column to ensure that you wont get the circular dependancy error.
then use the newly created copy of the column in your chart as below.
Can we get more info on how you're trying to sort it? I can see you've made a sort column.
Can you select the sort column from here?
Thanks, I am looking for sth different, which is to sort a Month Year Num. Your Solutions is for a fiscal year.
I have a Bar chart that shows the last 3 months. So I want to sort that column so that October 2022 comes fast
Create a Month number + Year column
Year('Date') & Month(date).
Put this column in the Tooltip part of your visual
Then in the top right of your visual, sort by that column
Hope this helps!
It has ordered but not correctly...
2023 Jan comes at the right position but 2022 months are not ordered...
Can you show me your calculated Column code for the sort please? 🙂
Month and Year = FORMAT([Date], "YYYY") & FORMAT('Calendar'[Date],"mmmm")
or try YEAR('Calendar'[Date] & MONTH('Calendar'[Date])
this is how i would write it 🙂
Hi,
One of ways to create a sort column for the Month Year Num column is to create a ENDOFMONTH column by using a DATE column and EOMONTH DAX formula.
EOMONTH function (DAX) - DAX | Microsoft Learn
I hope this helps.
Please expound, I did not understand your solution..
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 31 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 74 | |
| 61 | |
| 31 | |
| 31 | |
| 23 |