Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RichJW
Helper III
Helper III

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

 

1 ACCEPTED SOLUTION
AlB
Community Champion
Community 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

View solution in original post

2 REPLIES 2
AlB
Community Champion
Community 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

Hi there @AlB ,

 

That works beautifully, thank you.

 

Cheers,

Rich

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.