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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
01_RAF_01
Frequent Visitor

How to find same value in different tables (with no relationship)

Hi Guys, 

 

trying to find a solution for finding a value in 2 different tables. 

Table 1 has values (could be multiple devided by a ",")
Table 2 has values 

1.PNG

Whats the best way to check if the exact values from the second table are also available in the first table? 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @01_RAF_01 

Please try formula as below:

Measure1 = 
CONTAINSSTRING (
    CONCATENATEX ( VALUES ( Table1 ), Table1[Value], "," ),
    MAX ( Table2[Value] )
)

veasonfmsft_0-1653472425351.png

Please check my sample file for more details.

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @01_RAF_01 

Please try formula as below:

Measure1 = 
CONTAINSSTRING (
    CONCATENATEX ( VALUES ( Table1 ), Table1[Value], "," ),
    MAX ( Table2[Value] )
)

veasonfmsft_0-1653472425351.png

Please check my sample file for more details.

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

tackytechtom
Super User
Super User

Hi @01_RAF_01 ,

 

Spontaneously, I'd suggest the CONTAINS function in DAX.

 

Here the MS documentation.

 

And here a post with an example.

 

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

daXtreme
Solution Sage
Solution Sage

Well, first you should get rid of the commas in Power Query and split the values so that in the underlying table exists a column with just the atomic values. Once you have it, it'll be soooooo much easier to match one value against the other. Bear in mind that you don't have to get rid of the original column from the underlying table. You can still keep it.

 

However, right now it's a bit obscure what you're after. Is it a measure of some kind? Is it a calculated column? I don't know.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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