cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Accepted Solutions
Highlighted
Super User II
Super User II

Hi @Sach 

take a look at the following link:

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

 

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
Highlighted
Super User II
Super User II

Hi @Sach 

take a look at the following link:

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

 

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors