Forum Discussion
AnnaML
5 years agoFrequent Visitor
Week number not matching date
Hello, I have an issue with week numbers. I have created a column called YearWeek using the following: YearWeek = IF(WEEKNUM([Date].[Date])<10,FORMAT([Date],"YY0WW"),FORMAT([Date],"YYWW")) ...
- 5 years ago
Try this formula:
YearWeek = RIGHT(IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])),2) & WEEKNUM('Calendar'[Date], 21)
themistoklis
5 years agoCommunity Champion
Try this formula:
YearWeek = RIGHT(IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])),2) & WEEKNUM('Calendar'[Date], 21)
AnnaML
5 years agoFrequent Visitor
Thanks for the support, it really helped!