I also use Power BI with Postgresql and MS SQL and I work with dates. I have questions.
Why are you using Python when PBI can do all of what you do, like data conversion? (I realize you may know Python better than PBI, and Python gives us more flexibility. So that’s a good reason to use Python.)
Are you only data sources the Excel spreadsheet I see in your code?
Are your date columns linked from another spreadsheet or do they physically exist in the spreadsheet? To simplify things make sure the dates physically exist in your Excel spreadsheet, and are not linked to there. PBI has limitations and a few bugs. “Keep It Simple”.
Just off the top of my head. If you have 2 tables, call them table1 and table2, in PBI that don’t have linking fields (like some type of ID field) you can link them with a date table in PBI. But this requires both tables, table1 and table2, each have a date field that links to the date field in your date table.
Have you read up and tried a date table? Here’s a search for you.
We do this for time sheets as well because the part of our system that does time sheets was hacked together (by the vendor) and wasn’t designed very well.