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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.