Forum Discussion
Dimdate table isn't working
- 8 months ago
You have a few options to fix it:
1. Use a truly unique key for the relationship
Instead of MonthNumber, use a column like:
- FullDate (YYYY-MM-DD)
- DateKey (e.g., 20250101)
- YearMonth (e.g., 202501)
These are unique at the date or month level and are suitable for the one-side of a relationship.
2. Create a unique Year-Month key
If your fact table is at a monthly granularity, create a new column in DimDate:
YearMonth = dimdate[Year] * 100 + dimdate[MonthNumber]
This will ensure values like 202501, 202502, etc., which are unique.
You have a few options to fix it:
1. Use a truly unique key for the relationship
Instead of MonthNumber, use a column like:
- FullDate (YYYY-MM-DD)
- DateKey (e.g., 20250101)
- YearMonth (e.g., 202501)
These are unique at the date or month level and are suitable for the one-side of a relationship.
2. Create a unique Year-Month key
If your fact table is at a monthly granularity, create a new column in DimDate:
YearMonth = dimdate[Year] * 100 + dimdate[MonthNumber]
This will ensure values like 202501, 202502, etc., which are unique.