Forum Discussion
markefrody
Post Patron
7 years agoConverting Week and Year for Week 53 to Show Week 01 for Next Year
Hi, I'm having difficulties in converting week and year for week 53 (Dec 30 and 31, 2018) to be week 01 for 2019. Please note I am using storage mode as DirectQuery. Currently what I have is...
- 7 years ago
You can change your calculated columns for week and year slightly, and get the desired results without having to change it every year.
Weeknum = CONCATENATE("",Right(CONCATENATE("0",IF(WEEKNUM(Sheet1[SampleDate]) > 52, 1, WEEKNUM(Sheet1[SampleDate]))),2))Year = CONCATENATE("",Right(CONCATENATE("0", IF(WEEKNUM(Sheet1[SampleDate]) > 52, YEAR([SampleDate]) +1, YEAR(Sheet1[SampleDate]))),4))
tarunsingla
Solution Sage
7 years agoYou can change your calculated columns for week and year slightly, and get the desired results without having to change it every year.
Weeknum = CONCATENATE("",Right(CONCATENATE("0",IF(WEEKNUM(Sheet1[SampleDate]) > 52, 1, WEEKNUM(Sheet1[SampleDate]))),2))
Year = CONCATENATE("",Right(CONCATENATE("0", IF(WEEKNUM(Sheet1[SampleDate]) > 52, YEAR([SampleDate]) +1, YEAR(Sheet1[SampleDate]))),4))
markefrody
Post Patron
7 years agoThanks tarunsingla! It works!