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
rettedgui
New Member

Find matching text in 2 columns when data is not organized in the same order

Hey guys,

 

I need help. Typically in Excel when I want to find the exact text value in another column i do a VLOOKUP and it doesnt matter the order or row, it will find what I ask for. Here, I can't do that-I can only search matching data when the text is organized in the same order

(E.g. Colum A/row 2: Car-- Column B row 2: Car--then New column says match. If Car is in row 3 in Column B,, then no match).

 

I want to to this literally:

 

COLUMN A(Job Title)

COLUMN B(Ocuppation)

NEW COLUMN( Found, yes or no).

 

            Column A          Column B         Found

Row 2   Data Analyst     QA Analyst       YES(is in row 3)

Row 3   Sys Admin        Data Analyst     NO(nowhere)

 

Is this possible?

 

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @rettedgui,

 

According to your description above, you should be able to use the CONTAINS function(DAX) to add the "Found" column in this scenario. The formula below is for your reference. Smiley Happy

Found = IF(CONTAINS(Table1,Table1[Ocuppation],Table1[Job Title]),"Yes","No")

c1.PNG

 

Regards

View solution in original post

3 REPLIES 3
v-ljerr-msft
Employee
Employee

Hi @rettedgui,

 

According to your description above, you should be able to use the CONTAINS function(DAX) to add the "Found" column in this scenario. The formula below is for your reference. Smiley Happy

Found = IF(CONTAINS(Table1,Table1[Ocuppation],Table1[Job Title]),"Yes","No")

c1.PNG

 

Regards

rettedgui
New Member

What if I want to find the exact match in 2 columns and the data is not organized in the same row order???

 


I feel like I can only find matches when the data is in the same row...

 

 

Example:

 

 

I'm comparing colum A(Title standard)  with colum B(occupation) and. I want to see in my new column C if any value in title standard appears in occupation (I don't mind if it's in row 2 or 1000 as long as it matches  title standard.


Title Standard row 2: Data Analyst--->> Power BI checks all rows in column B---> Power BI finds Data Analyst in row 150 in Occupation--->> Power BI returns in column C = FOUND(it literally found the title somewhere in column B).

 

 

Can I do this some how? In excel i would use VLOOK UP.

LOOKUPVALUE?

 

Also:

https://thedataspecialist.wordpress.com/2013/02/16/equivalent-of-vlookup-in-daxpart-i/

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.