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
Anonymous
Not applicable

Create a Date column (or a measure) from work week

In one of my tables, I have a work week (WW) column. The data is formatted as follows.

 

 

 

2020WW25 --> Work Week 25 of 2020.
2020WW30 --> Work Week 30 of 2020.

 

 

 

You get the drift.

 

I would like to create a column (or even a measure) that would convert this WW to a date, so I can use it in a slider, and calculate rolling averages, and such. The WW starts on Mondays. Obviously the WW spans 7 days, so for the 'day' part of the date I prefer the first day of the WW.

 

For instance, if we take January 2020:

 

WWJan.PNG

2020WW01 starts on 12/30/2019, so that's what I would like that WW to be converted to.

Similarly, 

 

2020WW02 => 1/6/2020

2020WW03 => 1/13/2020

 

I know you can get the week from a date object, but I don't quite know how to go about the reverse.

 

 

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following link:

https://eriksvensen.wordpress.com/2019/11/26/powerquery-calculate-the-iso-date-from-year-and-a-week-number/

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

1 REPLY 1
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following link:

https://eriksvensen.wordpress.com/2019/11/26/powerquery-calculate-the-iso-date-from-year-and-a-week-number/

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

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.