Forum Discussion

Niraj_vora0106's avatar
Niraj_vora0106
Helper III
4 years ago
Solved

Week Start calculation

Hi community,    I want to group dates between Week_Start and Week_End. Yes I tried using WEEKDAY() function but I want it to be Dynamic.    For eg:  The current week in India, if I take Monday...
  • amitchandak's avatar
    4 years ago

    Niraj_vora0106 , You can get week start and week end like

     

    Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1
    Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)

     

     

    week name = format( 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1 , "dd \t\h mmmm - ") &
     format( 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2), "dd \t\h mmmm yyyy")