Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Date range issue

Hi,   I have imported an Excel file and now have a column (image below) with years set out as:   1991-92  1992-93 1993-94   and so on to 2029-30. They are just a financial year, I have no nee...
  • amitchandak's avatar
    5 years ago

    Anonymous , The format YYYY-YY is self sortable. from three dots it should sort .

     

    Else you can create a fate column like

    In power Query

    #date(Number.FromText(Text.Start([Year],4)),1,1)

     

    or dax

    Date(Left([Year],4),1,1)

     

    In case you create a column in DAX

    also create

    Year 1 = [Year]

     

    and use Year 1 in visual and this should have a date as the sort column

    why refer : How to Create Sort Column and Solve Related Errors: https://youtu.be/KK1zu4MBb-c