Forum Discussion

Vinod_G_245's avatar
Vinod_G_245
Helper I
3 years ago

Sorting weeknumbers (year)

Hi Team,

 

I want to show data on weekly basis  for entire year. im not able to create sort column for Weeknumber.

Thanks in advance. 

3 Replies

  • Mikelytics's avatar
    Mikelytics
    Resident Rockstar

    Hi Vinod_G_245 

     

    when creating your weeknumber column please use the following formula in power query.

     

    "KW" & Text.PadStart(Number.ToText([WeekNumOfYear]),2,"0")

     

    then it should sort correctly.

     

    Best regards
    Michael
    -----------------------------------------------------
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Appreciate your thumbs up!
    @ me in replies or I'll lose your thread.

     

     

     

    • Mikelytics's avatar
      Mikelytics
      Resident Rockstar

      Vinod_G_245 

       

      Please on top tell Power BI in the visual to sort ascending by the week and not by the value

       

      Best regards
      Michael
      -----------------------------------------------------
      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
      Appreciate your thumbs up!
      @ me in replies or I'll lose your thread.

       

    • Vinod_G_245's avatar
      Vinod_G_245
      Helper I

      Hi Mike, 

      Thanks for the solution. Im facing below errors in type Conversion. Please find attachments

      Week of year is in text format in calendar table.