Forum Discussion

Pjay987's avatar
Pjay987
Frequent Visitor
5 years ago
Solved

Need Help Putting Dates in time order

Hello, 

 

I have a set of data for employee hours by week. I want to see the dates in time order. Starting with Jan W1, Jan W2, Ect.

 

The issue I am having below is power BI is organizing the dates in alphabetical order. How do I fix this?

 

 

Thanks for your help!

  • You need to make a column in the query editor from that column to be used as the sort by column.  A formula like this results in a Date value in the correct value.  It isn't the date for each week (so you wouldn't want to use it in a visual), but it is the order you need.  Repalce Column1 with your current column name.

     

    = Date.FromText("2020-" & Text.BeforeDelimiter([Column1], " ") & Text.AfterDelimiter([Column1], "W"))

     

    Regards,

    Pat