Forum Discussion

agd50's avatar
agd50
Icon for Helper V rankHelper V
3 years ago
Solved

Year-month sort by?

I'm having an issue with the showing the right months and years with a year month column I made - 

Year-Month =
FORMAT('Calendar'[Date],"YY MMM")
(Syntax)^

How to get this to work correctly? (Years and months in the right place) Perhaps creating a secondary Year and month which has the sorting logic?

Kind Regards,
Andrew
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi agd50 ,

    Please try below steps:

    1. below is my test table

    Table:

    2. add a index column in Power Query Pane

    3. add a new column with your dax formula, sort the new column by "Index" column

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi agd50 ,

    Please try below steps:

    1. below is my test table

    Table:

    2. add a index column in Power Query Pane

    3. add a new column with your dax formula, sort the new column by "Index" column

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.