Forum Discussion
RonaldvdH
6 years agoPost Patron
Convert date into YEAR-Week
I need to change this formula so that the format will be YYYY-WW THis formula works but the result is 201801 or 201802 so without the '-' between Year and Week How do i change this formula ? ...
- 6 years ago
Hi RonaldvdH
Create a caluclated column
Column = IF(WEEKNUM([Date])<10,FORMAT([Date],"YYYY-0WW"),FORMAT([Date],"YYYY-WW"))
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
6 years agoCommunity Support
Hi RonaldvdH
Create a caluclated column
Column = IF(WEEKNUM([Date])<10,FORMAT([Date],"YYYY-0WW"),FORMAT([Date],"YYYY-WW"))
Best Regards
Maggie
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
saviola07
6 years agoFrequent Visitor
Hi Maggie,
I used your method and I thought it worked as a charm, but for some reason it uses the American week (so starts on Sunday).
I tried to amend the formula to this:
IF(WEEKNUM('Calendar'[Date];2)<10;FORMAT([Date];"YYYY-0WW");FORMAT('Calendar'[Date];"YYYY-WW"))
But I somehow needs to change the format of the "YYYY-WW" but absolutely no idea on how to do that!?