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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Stuznet
Helper V
Helper V

Find matching value in another table and return with text string

Hi all,

 

I've been looking around but couldn't find the simple solution to my work. So I have 2 tables and I need to perform lookup.

If table1[Item] = table[Item] then it is "match" 

 

Table 1
Item
Car
 
Table 2
Item
Car
1 ACCEPTED SOLUTION

Apologies, I'm not understanding this I feel, but if you want to know if there is a match in another table, you could do this:

 

Column = IF(COUNTROWS(FILTER(ALL('Table2'),'Table2'[Item] = [Item]))>0,"Match",BLANK())

@ 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...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

In general you would use LOOKUPVALUE to do this work or perhaps you could just relate the two tables. I don't think there is enough information presented to truly understand what you are trying to accomplish. 

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ 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...

So basically, I need to perform lookupvalue in both tables, if it is the same then return text string "Match"

Apologies, I'm not understanding this I feel, but if you want to know if there is a match in another table, you could do this:

 

Column = IF(COUNTROWS(FILTER(ALL('Table2'),'Table2'[Item] = [Item]))>0,"Match",BLANK())

@ 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...

Thank you so much @Greg_Deckler

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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