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
Anonymous
Not applicable

Relationship creation for date

Hi,

 

I have created a table with Dates from the past 3 days and wanted to create a relationship between that table and another one of my tables. However, after creating the relationship, everytime i utilise the slicer with the dates, it just shows nothing even though there are data for it. Can anyone help me with this issue?

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

What are the data types of Dates columns in both tables? Date or Datetime? If they are datetimes, do they have different time values? If they have different time values, you will probably see blank when using a slicer because it cannot find datetime values that are equal to the selected one in the slicer.

 

If you want to filter on dates, you could add an additional column which extracts only date values from the datetime column, and create a relationship on the new date column. If you don't need to use time values in this report, you could change the original datetime column to date type. But in this way the time values will be removed so ensure that you won't need them in the future if you do this. Otherwise adding an additional date column would be better.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

What are the data types of Dates columns in both tables? Date or Datetime? If they are datetimes, do they have different time values? If they have different time values, you will probably see blank when using a slicer because it cannot find datetime values that are equal to the selected one in the slicer.

 

If you want to filter on dates, you could add an additional column which extracts only date values from the datetime column, and create a relationship on the new date column. If you don't need to use time values in this report, you could change the original datetime column to date type. But in this way the time values will be removed so ensure that you won't need them in the future if you do this. Otherwise adding an additional date column would be better.

 

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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.