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
pdstats
Frequent Visitor

time relationship

I'm having a difficult time creating a relationship between two tables.  The relationshop is based on time (HH:mm).  One table is created from excel and the other is from SQL database.

 

Excel

00:00

00:01

00:02

etc

 

SQL

Convert(varchar(5),cfs.date_created,108) AS 'Time Reported'

Where cfs.date_created is datetime value

 

I can get the relationship to work perfectly in excel, but not in PBI Desktop.  Any suggestion are greatly appreciated.  I've been at this for 2 days to no avail.  Thanks in advance!

1 ACCEPTED SOLUTION

@pdstats

 

According to your description, I have reproduced your issue. Only Blanks have matches in the Slicer like below.

r1.PNGr2.PNG

 

The issue got fixed after I changed the type of Time(column in table from Excel) from Date/Time to Time in Query Editor

changetype.PNG

The Slicer works fine like below.

r3.PNG

Regards

View solution in original post

4 REPLIES 4
ankitpatira
Community Champion
Community Champion

@pdstats What is the error you're getting. Make sure one of the column has unique values for the relationship you're trying to create.

The time table has unique value containing 24 hours.  I receive no errors.  But when I filter, only blanks have matches.  It's almost as if there are no matching values between the two tables.  I can create the relationship successufly with no errors.

@pdstats

 

According to your description, I have reproduced your issue. Only Blanks have matches in the Slicer like below.

r1.PNGr2.PNG

 

The issue got fixed after I changed the type of Time(column in table from Excel) from Date/Time to Time in Query Editor

changetype.PNG

The Slicer works fine like below.

r3.PNG

Regards

You sir are a genius!   I've changed field to time by going into properties within PBI main screen, not the query editor.   After looking at your screens, I realized that I should be changing it within the Query editor.  As soon as I made the change, the result appeared correctly.  Thank you very very much!!!!

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.