Forum Discussion

AnnaML's avatar
AnnaML
Frequent Visitor
5 years ago
Solved

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"))  ...
  • themistoklis's avatar
    themistoklis
    5 years ago

    AnnaML 

     

    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)