Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix SubstituteHoliday to match WorkingDays range [2..6] (#49)
Fixes an issue where the calculated substitute holiday day is incorrect when `SubstituteHoliday.FridayIfSaturdayOrMondayIfSunday (-1)` is used. Repro: year `2022` or `2023`, config `{ "US", 12, 25, 0, 0, 0, "Christmas Day", -1, 100, 0, 0 }` This patch aims for preserving backward compatibility instead of breaking the current configuration value `{ 2, 3, 4, 5, 6 }`, which is used in multiple date templates. A change to the documentation is also required here: https://docs.sqlbi.com/dax-template/configuration/config-object/holidays#workingdays to update the statement "The weekdays are expressed by integer numbers where Sunday is 0" where Sunday should be 1 instead of 0.
- Loading branch information