Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
@Datagulf,
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..
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 53 | |
| 42 | |
| 34 | |
| 34 | |
| 21 |
| User | Count |
|---|---|
| 143 | |
| 125 | |
| 100 | |
| 81 | |
| 63 |