sql-bi / DaxDateTemplate

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

Duplicate of Anzac Day /Australia day in 2011 #5

Closed BVMather closed 6 years ago

BVMather commented 6 years ago

If you choose IsoCountryHolidays = "AU" then the date table fails to load.

You get an error that the primary date key must contain unique values.

Troubleshooting I see that Anzac Day and Easter Sunday fall on the same day in 2011. You would need to calculate the Easter holidays days first, and continue to offset the 'normal' holiday by +1 until you reach a non-Easter holiday working day.

I'm trying to figure out the required change, possibly to SubstituteHolidayOffset.

BVMather commented 6 years ago

I've checked some others and you get the same problem for:

Ascension Day / Labour Day in Belgium & Germany in 2008. Ascension Day / Liberation Day in Netherlands in 2005 & 2016

There will need to be a check does a particular holidaydate fall on any of the dates generated from a table of all the holidays that are Easter-offset holidays

marcosqlbi commented 6 years ago

Fixed by version 1.0.1