Forum Discussion
datetime to datetime relationship not pulling for visual
I am struggling with the relationship between my date calendar and a date field in a table. Both are set to DateTime. I am able to draw the relationship without error. It is not being picked up when I use my date calendar date functions on the visuals. What can I do to make this right?
* I have not used datetime fields before when relating tables so this is new to me.
Here are the screenshots of the data type in both tables. a screenshot of the relationship being drawn. screenshot of visual not working right due to relationship.
Hey,
using a calendar table is best practice :-)
As you can see the date column from your calendar has a time part of 12:00 AM and the column from "fact table" has also a timestamp.
Create a new column in your fact table that just contains the date (data type date instead of date time, and relate the calendar table to this new column.
Problem solved :-)
Regards,
Tom
1 Reply
- TomMartensSuper User
Hey,
using a calendar table is best practice :-)
As you can see the date column from your calendar has a time part of 12:00 AM and the column from "fact table" has also a timestamp.
Create a new column in your fact table that just contains the date (data type date instead of date time, and relate the calendar table to this new column.
Problem solved :-)
Regards,
Tom