cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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

Accepted Solutions
Highlighted
Super User III
Super User III

Re: If Data is the same in 2 columns

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

Re: If Data is the same in 2 columns

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

Highlighted
Helper II
Helper II

Re: If Data is the same in 2 columns

Hi there @AlB ,

 

That works beautifully, thank you.

 

Cheers,

Rich

 

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors