Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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. 

 

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago
    Month and Year = FORMAT([Date], "YYYY") & MONTH('Calendar'[Date])
     
    try this, let me know if it works 🙂 

11 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Please expound, I did not understand your solution..

       

  • Anonymous's avatar
    Anonymous
    Not 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?

    • Anonymous's avatar
      Anonymous
      Not 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

       



      • Anonymous's avatar
        Anonymous
        Not 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!

         

  • 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.