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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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