Forum Discussion

Rugilė's avatar
Rugilė
Frequent Visitor
2 years ago
Solved

Relationship between two tables

Greetings,

I'd like to establish a relationship between two tables, each possessing analogous Date and Name columns. However, I have encountered a challenge wherein I am only able to establish a relationship between either the Date or Name column, but not both simultaneously. Furthermore, the sole relationship configuration available to me is "Many with many." Consequently, when constructing a visual table, only one of these filters operates effectively—either Date or Name—resulting in redundant data within the table. I am curious to know whether it is possible to establish an alternative relationship between two columns of one table and two columns of another table?

 

  • Rugilė 

     

    if both columns (Date and Name), together are unique, you can create a calculated column (DAX   or in power query , which i prefer) ,to concatenate the 2 columns in one column .

     

    DAX :  cc =  concatenate( tbl_name[col_name], tbl_name[col1_name]) 

     

    then you link both tables on this new column .

     

    let me know if this works, or your requirement is something else .

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

2 Replies

  • Daniel29195's avatar
    Daniel29195
    Community Champion

    Rugilė 

     

    if both columns (Date and Name), together are unique, you can create a calculated column (DAX   or in power query , which i prefer) ,to concatenate the 2 columns in one column .

     

    DAX :  cc =  concatenate( tbl_name[col_name], tbl_name[col1_name]) 

     

    then you link both tables on this new column .

     

    let me know if this works, or your requirement is something else .

     

    If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
    It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠