Article

A Power BI date table I actually ship

A Power BI date table is a dedicated calendar with one row per day. Time-intelligence functions need it after you mark the Date column in Model view. BI Workbench generates that table in DAX or M at timothykirk.co.uk/workbench/; work stays in the browser.

Why a separate calendar

Measures such as year-to-date and prior year expect a continuous date column that is marked as a date table. A date on the fact table is not enough if there are gaps, or if more than one fact table has its own date.

The calendar also holds the labels the report will filter on: year, month, week, and financial period. Those columns belong on the date table, not repeated on every fact.

DAX or M

DAX is convenient when the model is already in Desktop and you want a calculated table. M is better when the calendar should land in Power Query with the rest of the warehouse load.

Either way, the Date column has to be a date type, the range has to cover every fact date you will report on, and the table must be marked in Model view. Until it is marked, time intelligence will not use it.

What BI Workbench generates

The default table name is Date. You set the start year, end year, week start (Monday or Sunday), and whether the fiscal year number is the year it starts or the year it ends.

Columns you can include: year, year month, month number, month name, quarter, week number, day name, is weekend, date key, ISO week, and fiscal year / month. Generate DAX or M, paste it into Desktop, then mark the Date column.

The tool does not mark the table for you, and it does not create relationships. That still happens in the model.

How to add a Power BI date table from BI Workbench

  1. Open BI Workbench. Open timothykirk.co.uk/workbench/ and choose the date table tool. Nothing is uploaded.
  2. Set the range and columns. Set start and end years so the calendar covers every fact date. Add year, month, quarter, week, weekend, date key, ISO week, and fiscal columns if the report filters on them.
  3. Generate DAX or M. Use DAX for a calculated table in Desktop, or M if the calendar should load in Power Query with the warehouse.
  4. Mark it in Model view. Paste the table into Desktop, then mark the Date column as a date table. Until it is marked, time intelligence will not use it.

Questions

What is a Power BI date table?

A dedicated calendar table with one row per day. Time-intelligence functions use it after you mark the Date column as a date table in Model view.

Should a date table be DAX or M?

DAX is convenient as a calculated table in Desktop. M is better when the calendar should load with the rest of the warehouse. Both still need to be marked as a date table.

What date-table columns does BI Workbench generate?

Year, year month, month number, month name, quarter, week number, day name, is weekend, date key, ISO week, and optional fiscal year / month. You set the year range, week start, and fiscal year numbering.

Who created BI Workbench?

Timothy Kirk. It is a free browser tool at timothykirk.co.uk/workbench/.