Forum Discussion

fisqkuz1's avatar
fisqkuz1
Frequent Visitor
4 years ago
Solved

relationship between two datetime columns

Is it impossible to create a one-to-many relationship given a datetime datatype for both columns?

 

There are no null values, in neither.

They are both date/time in power query.

Each value only exists 1 single time in the first table.

 

 

Why am I not allowed to create a one-to-many rel?

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi fisqkuz1 ,

     

    According to your screenshots, it seems that you have highlighted the mtuCetStart column from Table1 and weekDayCet column from Table2,  but they are not like you mentioned ——They are both date/time in power query.

     

    So do you mean mtuCetEnd or mtuCetStart column from Table2? Based on my test, the default relationship would be one-one,which is the most suitable.But certainly you could change it to one-many.

     

    In additional, I saw mtuID and mtuCetStart column in both tables, therefore I'd suggest you created relationships based on these fields which is meaningful.

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • fisqkuz1 , They need to be of the same data type.

    One side should not have any duplicate and blank values , they you should be able to join

    • fisqkuz1's avatar
      fisqkuz1
      Frequent Visitor

      hi Amit, please read my post. all these conditions are met

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi fisqkuz1 ,

     

    According to your screenshots, it seems that you have highlighted the mtuCetStart column from Table1 and weekDayCet column from Table2,  but they are not like you mentioned ——They are both date/time in power query.

     

    So do you mean mtuCetEnd or mtuCetStart column from Table2? Based on my test, the default relationship would be one-one,which is the most suitable.But certainly you could change it to one-many.

     

    In additional, I saw mtuID and mtuCetStart column in both tables, therefore I'd suggest you created relationships based on these fields which is meaningful.

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.