Forum Discussion
Rolling Date Identifiers
- 7 months ago
1) Create a WeekStart column in your Date table (Monday-start example):
WeekStart = 'Date'[Date] - WEEKDAY('Date'[Date], 2) + 12) Then create a RollingWeekIndex (1–5) measure (or calculated column if you truly need it stored):
RollingWeekIndex = VAR CurrentWeekStart = MAX ( 'Date'[WeekStart] ) VAR LatestWeekStart = CALCULATE ( MAX ( 'Date'[WeekStart] ), ALL ( 'Date' ) ) VAR DiffWeeks = DATEDIFF ( CurrentWeekStart, LatestWeekStart, WEEK ) RETURN IF ( DiffWeeks >= 0 && DiffWeeks <= 4, 5 - DiffWeeks ) - 7 months ago
hi zedsdead ,
Not sure if i fully get you, try to write a calculated column like:
Column = VAR _DateCurrent = TODAY() // VAR _DateCurrent = DATE(2026, 2, 9) VAR _MondayCurrent = _DateCurrent - WEEKDAY(_DateCurrent, 3) VAR _WeekShift = DATEDIFF(DATE(2025,12,22), TODAY(), WEEK) VAR _result = _WeekShift - DATEDIFF([date], _MondayCurrent, WEEK) +1 RETURN _resultit works like below:
you may comment line 2 and uncomment line 3 to try future dates, like next week:
Hello zedsdead,
Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to FreemanZ, cengizhanarslan & Zanqueta for sharing valuable insights.
Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.
Thank you for being part of the Microsoft Fabric Community.
thank you team for all of the responses! I'm still working through the solution and will mark as resolved asap.