Skip to content

Commit

Permalink
Fix configuration error when WeekDayNumber is 0 (Sunday)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertospelta committed Mar 26, 2024
1 parent ac0df8b commit c6cecee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Dax.Template/Tables/Dates/HolidaysTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public HolidaysTable(IHolidaysConfig config): base(config)
__SeptemberEquinox + '{config.HolidaysDefinitionTable}'[DayNumber],
IF ( '{config.HolidaysDefinitionTable}'[MonthNumber] = 96, -- March Equinox
__MarchEquinox + '{config.HolidaysDefinitionTable}'[DayNumber],
IF ( '{config.HolidaysDefinitionTable}'[WeekDayNumber] <> 0,
IF ( '{config.HolidaysDefinitionTable}'[WeekDayNumber] IN {{ 0, 1, 2, 3, 4, 5, 6 }},
VAR _ReferenceDate =
DATE ( __HolidayYear, 1
+ MOD ( '{config.HolidaysDefinitionTable}'[MonthNumber] - 1 + IF ( '{config.HolidaysDefinitionTable}'[OffsetWeek] < 0, 1 ), 12 ), 1 )
Expand Down

0 comments on commit c6cecee

Please sign in to comment.