The date table in Power BI

Almost every report analyses by time: per month, per quarter, against last year. For that, the model needs a date table of its own with every day, connected to the fact table and marked as a date table.

In short: a date table holds every day from the first to the last date, each exactly once, plus columns such as year, quarter, month. It connects Many to one to every date column of the fact tables and is set with Mark as date table under Table tools.

Prerequisites: Cardinality and cross filter direction.

Try it now

Task Make Date a proper date table: connect Sales[OrderDate] to 'Date'[Date] and mark Date as a date table with the column 'Date'[Date].

Sales 120 rows, 7 columns
OrderIDOrderDateShipDateProductIDRegionIDQuantityAmount
13 Oct 20266 Oct 20261221798
29 Nov 202519 Nov 20252351145
320 Sep 202627 Sep 2026544596
416 Jun 20252 Jul 20252151145
526 Mar 202631 Mar 20261343596
64 Dec 202510 Dec 2025545745
78 Jul 202526 Jul 2025614196
820 Feb 20251 Mar 202532359.7
99 Dec 202524 Dec 202562298
1012 Aug 202625 Aug 2026212458
117 Sep 202612 Sep 2026542298
122 Mar 202614 Mar 2026623147

Showing the first 12 of 120 rows.

Measures: [Total Sales]

Product 6 rows, 4 columns
ProductIDProductCategoryPrice
1LaptopHardware899
2MonitorHardware229
3MouseAccessories19.9
4KeyboardAccessories39.9
5Office suiteSoftware149
6AntivirusSoftware49
Region 4 rows, 2 columns
RegionIDRegion
1North
2South
3West
4East
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

Why a table of its own?

  • No gaps: the fact table is missing days without orders. Time intelligence such as last-year comparisons needs every day, though.
  • Once for everything: sales, budget and shipments hang off the same date table. A slicer on the year filters all of them at once.
  • Your own groupings: fiscal year, ISO week, public holidays, weekends: all as columns in the date table instead of repeating them in every fact table.

Without a date table, Power BI creates a hidden one of its own for every date column (the Auto date/time option). That is enough for small reports; for models with several fact tables you switch the option off and build your own.

Create a date table

Two common routes: in Power Query from a list of days, or in DAX via Modeling, New table:

Date = CALENDAR(DATE(2025, 1, 1), DATE(2026, 12, 31))

CALENDAR returns one column Date with every day in between. Year, month and quarter are added as calculated columns, for example Year = YEAR('Date'[Date]). To show month names in the right order, set "Sort by column" to the month number under Column tools.

One more exercise: the quarter as a column

Task For analyses by quarter: create the calculated column "Order Quarter" in Sales, the quarter of the order date as a number from 1 to 4.

Sales 120 rows, 7 columns
OrderIDOrderDateShipDateProductIDRegionIDQuantityAmount
13 Oct 20266 Oct 20261221798
29 Nov 202519 Nov 20252351145
320 Sep 202627 Sep 2026544596
416 Jun 20252 Jul 20252151145
526 Mar 202631 Mar 20261343596
64 Dec 202510 Dec 2025545745
78 Jul 202526 Jul 2025614196
820 Feb 20251 Mar 202532359.7
99 Dec 202524 Dec 202562298
1012 Aug 202625 Aug 2026212458
117 Sep 202612 Sep 2026542298
122 Mar 202614 Mar 2026623147

Showing the first 12 of 120 rows.

Measures: [Total Sales]

Product 6 rows, 4 columns
ProductIDProductCategoryPrice
1LaptopHardware899
2MonitorHardware229
3MouseAccessories19.9
4KeyboardAccessories39.9
5Office suiteSoftware149
6AntivirusSoftware49
Region 4 rows, 2 columns
RegionIDRegion
1North
2South
3West
4East
Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

Showing the first 12 of 730 rows.

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

In real Power BI

  1. Create: Modeling, New table, a formula with CALENDAR, or in Power Query.
  2. Connect: in model view, the fact table's date column to Date, Many to one.
  3. Mark: select the table, Table tools, Mark as date table, choose the date column. Power BI checks that every date appears exactly once.

Common mistakes

Gaps or duplicate days

A date table derived from the order dates has gaps. It can still be marked, but last-year comparisons calculate wrongly. CALENDAR or a list in Power Query avoids this.

Date with a time

If the fact table's date column contains a time, 3 Oct 2026 14:30 matches no day of the date table. Set the data type to Date in Power Query.

Frequently asked questions

How far should the date table reach?

From 1 January of the first year with data to 31 December of the last, even if not every day has data yet. CALENDARAUTO works out the range from the model itself.

Do I have to mark a date table?

Not for simple reports. Time intelligence functions such as TOTALYTD only calculate reliably with a date table that is marked or related on a date column, though.

Learn this next: calculated columns

New columns in the model with DAX, RELATED and DATEDIFF.

Calculated columns

Write to us

Choose language

Select your preferred language