Forum Discussion
Dynamic Holiday Calendar using Power Query not DAX
- Anonymous2 years ago
I have solved this. by following the steps below. it is pretty long but I had to figure out a way when I got no response.
1. Used the date start and end date to create a date table.
2. Used the Add column to add weeek of month, month name, day name, Month & Day
3. I merged columns as follows:
a. Month and Day
b. week of month, day name and month
4. Used conditional column to tell the system when to display any of the above stated holiday names
5. Given that some of the days were Saturday or Sunday, I added a custom column to replace the date using the logic below:
a. For Sunday, I used - if Text.Contains ([Day Name],"Sunday") then Date.AddDays([Date],1) else ""
b. For Saturday, I used - if Text.Contains ([Day Name],"Sunday") then Date.AddDays([Date],2) else ""
6. I merged #5a&b
7. Used Conditional column to replace all null dates with date column and others with value from #6.
Please ensure to always convert these actions to date
Thanks so much for this but I am looking for a power query solution not DAX.
Once again thank you
Hi, I had the same problem and managed to create a dynamic source for Greece. You can take a look here. I put it here if someone has the same issue. https://github.com/FotMac/powerquery-public-holidays-gr