Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
joshcomputer1
Helper V
Helper V

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.

ss4.PNG

ss1.PNGss2.PNGss3.PNG

1 ACCEPTED SOLUTION
TomMartens
Super User
Super 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

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super 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

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.