Forum Discussion

Raj12's avatar
Raj12
Helper III
2 years ago
Solved

Fetch multiple rows data from another table based on matching ID's

I have two spaerate tables that can't be linked together directly.

Table 1 has User with multiple ID's and Table 2 has unique users. I need to create new calculated column in table 2 for matching user with all conversation ID from table 1, added in a single row 

 

Table 1   Table2 
userConversation ID  userNew Calculated Column
0899-12/01/2024   12cd  0899-12/01/2024   12cd; 155d ;114f
0899-12/01/2024   155d  0123-11/02/2024   233d; 122d
0899-12/01/2024   114f  1422-18/02/2024   121o
0123-11/02/2024   233d    
0123-11/02/2024   122d    
1422-18/02/2024   121o    

 

  • Hi Raj12 

     

    Try this:

    new calculated column = 
    VAR __tbl =
        FILTER ( table1, table1[user] = EARLIER ( table2[user] ) )
    RETURN
        CONCATENATEX ( __tbl, [Conversation ID], ";" )
    

     

1 Reply

  • Hi Raj12 

     

    Try this:

    new calculated column = 
    VAR __tbl =
        FILTER ( table1, table1[user] = EARLIER ( table2[user] ) )
    RETURN
        CONCATENATEX ( __tbl, [Conversation ID], ";" )