From 6865f74cd0288973442d1e4c8a4e4319322d7733 Mon Sep 17 00:00:00 2001 From: Alberto Spelta Date: Wed, 10 Apr 2024 19:08:21 +0200 Subject: [PATCH] Fix sobstitute offset calc in HolidayDefinition Fix the calculation of the sobstitute offset for non-working days where DATETIME variable `_HolidayDateStep1` is used instead of the INT64 `_HolidayDayStep1` --- src/Dax.Template/Tables/Dates/HolidaysTable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dax.Template/Tables/Dates/HolidaysTable.cs b/src/Dax.Template/Tables/Dates/HolidaysTable.cs index d6c0dd3..95d5224 100644 --- a/src/Dax.Template/Tables/Dates/HolidaysTable.cs +++ b/src/Dax.Template/Tables/Dates/HolidaysTable.cs @@ -274,7 +274,7 @@ NOT CONTAINS ( __WorkingDays, ''[Value], _HolidayDayStep1 ), MINX ( __WorkingDays, ''[Value] ) + 7, _NextWorkingDayStep2 ) - RETURN _SubstituteDay - _HolidayDateStep1 + RETURN _SubstituteDay - _HolidayDayStep1 ) VAR _SubstituteOffsetStep2 = _SubstituteOffsetStep1 + _SubstituteHolidayOffsetNonWorkingDays VAR _SubstituteDateStep2 = _OriginalSubstituteDate + _SubstituteOffsetStep2