Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Sort Month-Year column in Descending order in Matrix visual

Hi Everyone,   I have a "Month-Year" column with values from "Apr 2017" to "Mar 2019". When I put it in Matrix visual, it displayed data from "Apr 2017" to "Mar 2019" i.e. ascending order. So, I wa...
  • v-lili6-msft's avatar
    7 years ago

    hi, Anonymous 

    You could use Sort by column in Power BI Desktop

    https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

    Step1:

    Add a sort conditional column for "Month-Year" column.

    for example:

    Condition = - ( YEAR('Date'[Date])*100+MONTH('Date'[Date]) )

    Step2:

    Then select "Month-Year" field and then click Modeling->Sort by column->"Condition"

    Result:

     

    Best Regards,

    Lin