sql-bi / DaxDateTemplate

Power BI template to create a Date table in DAX
MIT License
265 stars 76 forks source link

Relative Offsets are backwards #41

Closed ghost closed 2 years ago

ghost commented 4 years ago

It looks like the Calendar RelativeWeekPos (and Month, Quarter, Year) are backwards. The documentation says negative values should be in the past and positive values are in the future relative to the TodayReference. At line# 822, if you flip the calculation from

VAR RelativeWeekPos = CurrentWeekPos - YearWeekNumber

to VAR RelativeWeekPos = YearWeekNumber - CurrentWeekPos it will work.

marcosqlbi commented 2 years ago

Fixed in v1.15, thanks!