Tag Archive | Calendar Table

Create a Calendar Table using DAX

To create a Calendar Table in DAX, we will be using the Calendar and the Add Columns Function.

Go to Modelling – New Table.

Enter the Below DAX Code

The result is as under

The Calendar Table requires a Start Date and an End Date. We have used the Date Function to provide the details. The DATE functions required (Year, Month, Day) format.

  • In our example we have provided the Start Date as 1 Jan 2023 and the End Date as 31 Dec 2024.

We would get a column of continuous dates from 1 Jan 2023 to 31 Dec 2024.

  • On this columns we use ADD COLUMNS and use various functions to get Year, Month No, Day,  Month Name , Day Name, Day Type and Quarter.

There are inbuilt functions to get Month No, Year, Day, Weekday No.

We also use the Format Function to get Month Name, Day Name and the TRUNC function to get the Quarter No.

If you look at the first column, we get a list of Dates and Times. We only want Dates and that too in a particular format. To achieve that, click on the column, Go to Column tools and select the required date format.

Our Final Result will look as under.