Power BI Calender DAX

Generating a calender was a very important task within qlik sense/view – so even as the date functions within power query or dax are awesome, I still prefer to have an “inbuild” calender. To achieve this goal, you can switch to the “Modeling” view -> add a “Table” and then just copy and paste the statement below:

The funny part is, that PowerBI provides an “autocalender” function, which goes through the whole dataset and searches for the lowest date value and the latest date value, which can produce a hugh amount of data if you have e.g. 31.12.9999 as a max future date…