Forum Discussion

RichJW's avatar
RichJW
Icon for Helper III rankHelper III
6 years ago
Solved

If Data is the same in 2 columns

Hi,

 

I have a table, which has 2 datasets and a solid relationship between both. I have added a column with the formula "Column1 = CONTAINS(Table1,Table1[Column 1],Table1[Column 2])".

 

I wanted it to do the following...

Look in Column1 and if there is duplicate data in Column2, add a TRUE for that row, if not then FALSE.


However I only want it to look in the same ROW, whereas the above formula is looking at the entire table. So, it's currently showing as TRUE if duplicate data is in Column1 (on row 4, for example) and Column 2 (any other row). I would only want it for row 4, using the example given. I'm sure there is a simple way round this, but I can't get it.

 

Many thanks,

Rich

 

  • Hi RichJW 

    NewCol = Table1[Column1] = Table1[Column2]

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     

    Cheers  Datanaut

2 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi RichJW 

    NewCol = Table1[Column1] = Table1[Column2]

    Please mark the question solved when done and consider giving kudos if posts are helpful.

     

    Cheers  Datanaut

    • RichJW's avatar
      RichJW
      Icon for Helper III rankHelper III

      Hi there AlB ,

       

      That works beautifully, thank you.

       

      Cheers,

      Rich