Forum Discussion

Sylvine_Wyz's avatar
Sylvine_Wyz
Icon for Helper IV rankHelper IV
5 years ago
Solved

search equivalence

Hello Everybody, 

 

i would like to know if the exact values from a column in a table exist in a column from an other table.

 

1rst table : wyz_reporting supplier_invoices

2nd table : wyz_reporint bi_order

 

The solution is to know which data from the supplier_invoice table does not exist in the bi_order table.

 

Thanks for your help

 

Have a nice day

  • Hi Sylvine_Wyz ,

    You can try to create this calculated column:

    Flag =
    IF (
        'wyz_reporint bi_order'[Liaison]
            IN DISTINCT ( 'wyz_reporting supplier_invoices'[liaison] ),
        "yes",
        "no"
    )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Yingjie Li

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

7 Replies

    • Sylvine_Wyz's avatar
      Sylvine_Wyz
      Icon for Helper IV rankHelper IV

      Hello FrankAT 

      Thanks for your help. 

      But i don't arrive. My 2 columns are not in POWER QUERY.

      They are 2 columns i created 

      liaison = 'wyz_reporting supplier_invoices'[Frn Order N°]&" "&'wyz_reporting supplier_invoices'[ean]&" "&'wyz_reporting supplier_invoices'[supplier_id]
       
      i want to create a new column with yes or no if the values in the table 1 are in the table 2
  • v-yingjl's avatar
    v-yingjl
    Icon for Community Support rankCommunity Support

    Hi Sylvine_Wyz ,

    You can try to create this calculated column:

    Flag =
    IF (
        'wyz_reporint bi_order'[Liaison]
            IN DISTINCT ( 'wyz_reporting supplier_invoices'[liaison] ),
        "yes",
        "no"
    )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Yingjie Li

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

    • Sylvine_Wyz's avatar
      Sylvine_Wyz
      Icon for Helper IV rankHelper IV

      Hi v-yingjl 

       

      i tried your solution but there is an error.

      I can't to choice the column Liaison in the formul. 

       

      😞

      • v-yingjl's avatar
        v-yingjl
        Icon for Community Support rankCommunity Support

        Hi Sylvine_Wyz ,

        Seems like you have created a mesure instead of calculated column by this formula. This formula is used to create a calculated column in the wyz_reporint bi_order table. Try to create a new column not a new measure.

         

        Best Regards,
        Yingjie Li

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