Forum Discussion
Tajkment
2 years agoNew Member
Weeknum - weeks covering 9 days
Hi, I have been putting together a custom financial year callendar, i have realised that the Weeknum dax is returning the same week number for the range of 9 days, is there a way to fix it? Exa...
- 2 years ago
Tajkment How about this?
Column 3 = VAR __Date = [Date] VAR __StartDate = DATE( 2024, 7, 1 ) VAR __StartDay = WEEKDAY( __StartDate ) VAR __Result = COUNTROWS( FILTER( 'Calendar', [Date] <= __Date && [Date] >= __StartDate && WEEKDAY([Date]) = __StartDay ) ) RETURN __Result
Greg_Deckler
Community Champion
2 years agoTajkment Don't use EDATE? You are using EDATE with a -6. This means that August 29th through 31st will all return a date of February 29th, which is 6 months back from August. Since February doesn't have a 30th or 31st, those will both return 29th of February or last date in February. So, probably not what you want.