diff --git a/src/Dax.Template/Tables/Dates/HolidaysTable.cs b/src/Dax.Template/Tables/Dates/HolidaysTable.cs index 839c7cc..866df93 100644 --- a/src/Dax.Template/Tables/Dates/HolidaysTable.cs +++ b/src/Dax.Template/Tables/Dates/HolidaysTable.cs @@ -170,14 +170,14 @@ public HolidaysTable(IHolidaysConfig config): base(config) FILTER ( __WorkingDays, ''[Value] > __HolidayWeekDay ), ''[Value] ) - VAR _SubstituteDay = + VAR _SubstituteWeekDay = IF ( ISBLANK ( _NextWorkingDay ), MINX ( __WorkingDays, ''[Value] ) + 7, _NextWorkingDay ) RETURN - _SubstituteDay - __HolidayWeekDay + _SubstituteWeekDay - __HolidayWeekDay + ( '{config.HolidaysDefinitionTable}'[SubstituteHoliday] - 1 ) ) ) // ) @@ -268,13 +268,13 @@ NOT CONTAINS ( __WorkingDays, ''[Value], _HolidayWeekDayStep1 ), FILTER ( __WorkingDays, ''[Value] > _HolidayWeekDayStep1 ), ''[Value] ) - VAR _SubstituteDay = + VAR _SubstituteWeekDay = IF ( ISBLANK ( _NextWorkingDayStep2 ), MINX ( __WorkingDays, ''[Value] ) + 7, _NextWorkingDayStep2 ) - RETURN _SubstituteDay - _HolidayWeekDayStep1 + RETURN _SubstituteWeekDay - _HolidayWeekDayStep1 ) VAR _SubstituteOffsetStep2 = _SubstituteOffsetStep1 + _SubstituteHolidayOffsetNonWorkingDays VAR _SubstituteDateStep2 = _OriginalSubstituteDate + _SubstituteOffsetStep2