Forum Discussion

jcastr02's avatar
jcastr02
Post Prodigy
5 years ago

New Month Order

 I have a table with unique completion dates/time and I created calculated column to display on chart in format "mmm-yy"  .  I then created a month number column and sorted the formatted "mmm-yy" by month number.  With new January 2021 data, now it is placing this first.  How can I organize visuals so that it's in sequential (time order).  Thank you.  

 

13 Replies

  • Watsky's avatar
    Watsky
    Solution Sage

    You can create a column with year and month and index base on that column.

     

     


    Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
    Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

     

    • jcastr02's avatar
      jcastr02
      Post Prodigy

      Watsky  How did you do the custom column in M code to get in format   "mmm-yy"?    I didn't do that column in m code, I did it in DAX

      • Watsky's avatar
        Watsky
        Solution Sage

        I added a column and did columns by example based on selection of Year and Month.

  • jcastr02 here is the code to add a column in the Power query

     

    Date.ToText([Your Date column],"yyyy-MM"))

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

  • jcastr02 yours is a date-time column, do this

     

    Date.ToText(Date.From([Your Date/Time column]),"yyyy-MM"))

     

    Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • jcastr02's avatar
      jcastr02
      Post Prodigy

      @parry2k I did formula but not getting the format, seems it's just giving me the date? any help is appreciated

      date234.png

  • jcastr02 is that [Completion Time] column is a date/time column? Can you change the type of this column to Text. This seems weird to me.

  • jcastr02 you have to share pbix file, I don't know what is going on. very hard to tell, everything is working fine at my end.