SF logo
Power BI toolkit

Date Table Generator

Set your fiscal year, weeks and holidays, check the rows, and copy a ready-made date table as DAX, Power Query (M) or a TMDL script. No Copilot needed.

Step1

Connect your model

Optional. With your model, tick the date columns your data uses, and the table can start and end with your data.

  1. In Power BI Desktop, open DAX query view, paste this query into a new tab and select Run.
  2. Select Copy above the results grid and paste below. Then tick the columns that hold real business dates.
DAX query: list date columns

        
Step2

Fiscal year and date range

The range should cover every date in your data, in whole years.

Name each fiscal year by

Whole years are
Start

End
Step3

Weeks, weekends and holidays

These drive the week columns and Is Working Day.

Weeks start on
Weekend days

Holidays in

DateDayHoliday
Step4

Choose the columns

Date is always included and marks the table as a date table. Text columns that need a sort order get one; a hidden number column is added when needed.

Step5

Check some rows

Exactly what the table will hold for these dates. Pick a date near a fiscal year end or a holiday to check them.

Jump to
Step6

Copy the date table

DAX makes a calculated table; Power Query makes a query you can refresh and reuse. The TMDL script adds the table with its sort orders, formats and date-table setting in one go.

DAX