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
iiomarioii
Helper II
Helper II

Does a column of another table contain a certain value?

Hi guys, 

 

i have these tables: 

 

Inventory 1: 

 

Item number Quantity ...
102210...
202220...
303330...

 

Inventory 2: 

Item numberQuantity...
102210...
202220...
111130...

 

I need a column that shows me wheater 'Inventory 2'[Item number] contains the Item numbers of 'Inventory 1'[Item number] or not.

 

So for example like a new column in Inventory 1: 

Inventory 1: 

Item number Quantity Comparison
102210true ( exists also in Inventory 2)
202220 true 
303330false 

 

All item numbers are strings. 

 

Any solutions for this? 

 

Thank you 🙂

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@iiomarioii 

you can use LOOKUPVALUE that Greg suggested or you can also try this

Column = if(MAXX(FILTER('inventory2',inventory2[itmenumber]=inventory1[itemnumber]),inventory2[qty])=inventory1[qty],"True","False")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ryan_mayu
Super User
Super User

@iiomarioii 

you can use LOOKUPVALUE that Greg suggested or you can also try this

Column = if(MAXX(FILTER('inventory2',inventory2[itmenumber]=inventory1[itemnumber]),inventory2[qty])=inventory1[qty],"True","False")

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Greg_Deckler
Super User
Super User

@iiomarioii - In general, use LOOKUPVALUE. You can also use techniques such explained here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434 and here: https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/m-p/974201#M430

 


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