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 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.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@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.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Please expound, I did not understand your solution..
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |