Forum Discussion

Tajkment's avatar
Tajkment
New Member
2 years ago
Solved

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...
  • Greg_Deckler's avatar
    Greg_Deckler
    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