Forum Discussion
Implementing a date table without interfering with existing relationships
- Anonymous9 years ago
Hi lefinalzugzwang,
>>But I don't fully understand how to create relationships between these dates/date table without disrupting the schema and hence other relationships.
For the date table, I'd like to suggest you create with all tables date fields, for example:
Date Table = var temp=DISTINCT(UNION(VALUES(Table1[Date]),VALUES(Table2[Date]),VALUES(Table3[Date]),...)) Return CALENDAR(MINX(temp,[Date]),MAXX(temp,[Date]))
Then you can create one to many relationship from calendar table to each other table which contains the date field, use calendar table as source of the filter.
Regards,
Xiaoxin Sheng
Hi lefinalzugzwang,
>>But I don't fully understand how to create relationships between these dates/date table without disrupting the schema and hence other relationships.
For the date table, I'd like to suggest you create with all tables date fields, for example:
Date Table = var temp=DISTINCT(UNION(VALUES(Table1[Date]),VALUES(Table2[Date]),VALUES(Table3[Date]),...)) Return CALENDAR(MINX(temp,[Date]),MAXX(temp,[Date]))
Then you can create one to many relationship from calendar table to each other table which contains the date field, use calendar table as source of the filter.
Regards,
Xiaoxin Sheng