Forum Discussion

felipesaw's avatar
felipesaw
Frequent Visitor
3 years ago
Solved

doubts with merge tables

Doubts with merge tables I have this first table with everything, and this second with some occurred, needed based on the id and the fruit return the resutable that has all the occurreds of these fruits of the second table.

 

first table

idfruitvalue
1grape10
2grape20
3grape30
4apple40
5apple50
6pineapple10
7pineapple12

 

second table

idfruitvalue
1grape10
4apple40

 

Result

idfruitvalue
1grape10
2grape20
3grape30
4apple40
5apple50
  • Hi felipesaw ,

    According to your description, here's my solution. 

    In the first table, add a custom column.

    if List.Contains(#"second table"[fruit],[fruit]) then 1 else 0

    Then filter the custom column only keep 1.

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    If you combine both tables by fruit column, you will have a table like this:

    Then if you maintain id and value from table 1 and Fruit from table 2 you have the result

    • felipesaw's avatar
      felipesaw
      Frequent Visitor

      Very appreciate, but does not work.

      my main connection between the tables is the ID, the name repeats.

       

      I need to use the id column of the second table to search for which fruits you have in the first table that has an id equal to the second. And bring all the lines with this fruit to the result table

  • Hi felipesaw ,

    According to your description, here's my solution. 

    In the first table, add a custom column.

    if List.Contains(#"second table"[fruit],[fruit]) then 1 else 0

    Then filter the custom column only keep 1.

    Result:

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

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