Date Tables
Learn how Power BI date tables enable time intelligence, filtering, and accurate date-based analysis.
Date Tables
Date tables are one of the most important dimensions in a Power BI data model.
They provide the calendar structure required for time-based analysis.
A date table allows users to analyze data by:
- Year
- Quarter
- Month
- Week
- Day
- Fiscal periods
Example:
DimDate
|
|
DimCustomer --- FactSales --- DimProductThe date table filters the fact table through a relationship.
Why Use a Date Table?
Power BI can automatically create hidden date tables when using date columns.
However, professional Power BI models use dedicated date tables.
Benefits include:
- Consistent date filtering
- Better DAX calculations
- Time intelligence support
- Fiscal calendar support
- Reusable date logic
Date Table Structure
A typical date table contains:
DimDate
DateKey
Date
Year
Quarter
Month
Month Number
Week
DayExample:
| Date | Year | Month | Quarter |
|---|---|---|---|
| 2026-01-01 | 2026 | January | Q1 |
| 2026-02-01 | 2026 | February | Q1 |
| 2026-03-01 | 2026 | March | Q1 |
Date Keys
Many models use a numeric date key.
Example:
DateKey
20260101
20260102
20260103Fact tables store the key:
FactSales
DateKey
ProductKey
SalesAmountThe relationship:
DimDate
DateKey
|
|
FactSales
DateKeyconnects dates to transactions.
Creating a Date Table in DAX
Example:
DimDate =
CALENDAR(
DATE(2020,1,1),
DATE(2030,12,31)
)Additional columns can be added:
Year =
YEAR(DimDate[Date])Month =
FORMAT(
DimDate[Date],
"MMMM"
)Month Number =
MONTH(DimDate[Date])Mark as Date Table
After creating a date table:
- Select the table in Power BI.
- Choose Table tools.
- Select Mark as date table.
- Choose the Date column.
This tells Power BI the table represents the official calendar.
Date Hierarchies
Date tables often contain natural hierarchies.
Example:
Year
|
Quarter
|
Month
|
DayUsers can drill down:
2026
|
Q1
|
January
|
January 15Time Intelligence
Date tables enable common DAX calculations.
Example:
Total Sales
Total Sales =
SUM(FactSales[SalesAmount])Year-to-Date Sales
Sales YTD =
TOTALYTD(
[Total Sales],
DimDate[Date]
)The calculation automatically responds to date filters.
Fiscal Calendars
Many businesses do not follow January to December calendars.
Examples:
- Manufacturing fiscal years
- Retail calendars
- 4-4-5 calendars
A date table can include:
Fiscal Year
Fiscal Quarter
Fiscal PeriodExample:
| Date | Fiscal Year | Period |
|---|---|---|
| 2026-07-01 | FY2027 | Period 1 |
Multiple Date Relationships
Fact tables may contain multiple dates.
Example:
FactSales
OrderDateKey
ShipDateKey
DeliveryDateKeyA single date table can support all of them.
Example:
DimDate
|
|
FactSales
Order Date
Ship Date
Delivery DateOnly one relationship is active.
Other relationships can be activated with DAX.
Date Table Best Practices
Follow these guidelines:
- Create one official date table.
- Use it across all fact tables.
- Include future dates for planning.
- Add fiscal calendar columns when needed.
- Mark it as a date table.
- Sort month names by month number.
Common Date Table Mistakes
Avoid:
Using Automatic Date Tables
Problems:
- Creates hidden tables
- Duplicates logic
- Makes models harder to maintain
Sorting Months Alphabetically
Incorrect:
April
August
December
FebruaryCorrect:
January
February
MarchUse:
Month Name
sorted by
Month NumberDate Table Checklist
A good date table should:
- Contain continuous dates
- Have a unique date column
- Connect to fact tables
- Support time intelligence
- Include business calendar requirements
Next Steps
Continue learning Power BI modeling:
Advanced Topics: