Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vinod_G_245
Frequent Visitor

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.sorting column.PNG 

3 REPLIES 3
Mikelytics
Resident Rockstar
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")

Mikelytics_0-1673535363867.png

 

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.

 

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Hi Mike, 

Thanks for the solution. Im facing below errors in type Conversion. Please find attachmentsError_Display.PNGError_Type.PNG

Week of year is in text format in calendar table.

@Vinod_G_245 

 

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

Mikelytics_2-1673535540150.png

 

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.

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.