Forum Discussion

pdstats's avatar
pdstats
Frequent Visitor
9 years ago
Solved

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!

  • pdstats

     

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

     

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

    The Slicer works fine like below.

    Regards

4 Replies

  • ankitpatira's avatar
    ankitpatira
    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.

    • pdstats's avatar
      pdstats
      Frequent Visitor

      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.

      • v-ljerr-msft's avatar
        v-ljerr-msft
        Microsoft Employee

        pdstats

         

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

         

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

        The Slicer works fine like below.

        Regards