Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Sequential Dates

Hello.    I am trying to assign numbers to dates, but not based on the 365 calendar. I need it to start on a certain date (9/18/2022 for example) as day 1, and sequentially count the days as number...
  • Greg_Deckler's avatar
    Greg_Deckler
    3 years ago

    Anonymous Don't filter out the weekends then (the < 6 part):

     

    Sequential Date Number = 
      VAR __StartDate = MAX('Table'[StartDate])
      VAR __Date = MAX('Table2'[Date])
      VAR __Table = CALENDAR(__StartDate, __Date),
    RETURN
      COUNTROWS(FILTER(__Table))