Forum Discussion
maijanen
6 years agoFrequent Visitor
Need help converting YEAR/WEEK_NUMBER (text format) into date format
I have data that has year and week number like 2020/02. Power BI detects it as text but not as date. How could I convert this into another column and so that it could detect it as a week number? ...
- 6 years ago
Thank you all for your help. I'm quite new to Power BI and I think I wasn't able to describe my problem properly and that's my fault. I got a link from a friend of mine to this blog post that helped in my problem: https://eriksvensen.wordpress.com/2019/11/26/powerquery-calculate-the-iso-date-from-year-and-a-week-number/
Anonymous
6 years agoNot applicable
Hi maijanen,
If you need a week number column only you can delete the year column after split. Or if you need to have it in the date format you can use #date (2020,1,1) + #duration (weeknumber, 0, 0, 0) after extracting the week number.
It is possible to do it all as column.transform rather and adding and then deleting columns, but it is more cosmetics - the algorithm stays the same.
Kind regards,
JB
If you need a week number column only you can delete the year column after split. Or if you need to have it in the date format you can use #date (2020,1,1) + #duration (weeknumber, 0, 0, 0) after extracting the week number.
It is possible to do it all as column.transform rather and adding and then deleting columns, but it is more cosmetics - the algorithm stays the same.
Kind regards,
JB
maijanen
6 years agoFrequent Visitor
Thank you all for your help. I'm quite new to Power BI and I think I wasn't able to describe my problem properly and that's my fault. I got a link from a friend of mine to this blog post that helped in my problem: https://eriksvensen.wordpress.com/2019/11/26/powerquery-calculate-the-iso-date-from-year-and-a-week-number/
- Guido_Beulen4 years agoHelper I
This is awesome!