Forum Discussion

bo_afk's avatar
bo_afk
Post Patron
6 years ago
Solved

Sorting two date columns

In my data I have two date columns, one is RaisedOrder date and the other is DeliveryDate.

 

I've created a slicer (using the hierarchy slicer) for each of these columns by Year and Month name. Currently, the slicer is sorted by month name alphabetically, (e.g April at the top). 

 

I would like to sort this by month number so that January is at the top and December at the bottom. And I'd like to do this for both slicers for RaisedOrder date and DeliveryDate.

 

Any ideas?

 

Thanks

afk

  • bo_afk's avatar
    bo_afk
    6 years ago

    Hi V-lianl-msft , I solved it by bringing in the month number directly from the data source, along with the month name. I could then sort the month name by the month number and this looked to solve the issue.

     

    Initially I'd created a month number column within Power BI, based off of the date, and then sort the month name by this column but this didn't work.

10 Replies