Forum Discussion
Sort a Month Year Column
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.
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.
- Anonymous3 years agoMonth and Year = FORMAT([Date], "YYYY") & MONTH('Calendar'[Date])try this, let me know if it works 🙂
11 Replies
- Jihwan_KimSuper User
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.
- AnonymousNot applicable
Please expound, I did not understand your solution..
- AnonymousNot applicable
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?
- AnonymousNot applicable
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- AnonymousNot applicable
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!
- LP280388Resolver II
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.