Forum Discussion
acnt_schartner
Helper III
5 years agoLooking for real year-week
Hi, i have a dax created calender 1_Param_Dates = VAR Days = CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2021, 12, 31 ) ) RETURN ADDCOLUMNS ( Days, "Year", YEAR ( [Date] ), "MonthNumber", ...
- 5 years ago
I have amended the year formula. Please see below
Year = IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date]))
YearWeek = IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])) & "-" & WEEKNUM('Calendar'[Date], 21)
themistoklis
Community Champion
5 years ago
I have amended the year formula. Please see below
Year = IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date]))
YearWeek = IF(WEEKNUM('Calendar'[Date], 21)=53 && MONTH('Calendar'[Date])=1, YEAR('Calendar'[Date]) -1, YEAR('Calendar'[Date])) & "-" & WEEKNUM('Calendar'[Date], 21)
acnt_schartner
Helper III
5 years agoThats it. Thank you.