cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors