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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
aabati
Frequent Visitor

Filtering a table using values in a separate table and wild character

Dear community,

I need your help.

 

I have a Table_A containing 2 columns:

- ID

- Description

 

I have a Table_B containing one column:

- Lookup

 

And I'd like to filter the rows in Table_A using the following rule: select * from Table_A where description "contains" any value in the column Lookup.

 

Let me explain better with an example:

 

Table_A

1     Corporate|House

2     House

3     Car|Corporate|Bike

4     Van

 

Table_B

Corporate

Van

 

I want to return the rows 1,3 and 4 becasue they contains one of the values in the Table_B

Many thanks

A.

 

 

1 ACCEPTED SOLUTION
aabati
Frequent Visitor

I think I found a solution in this article:

https://powerpivotpro.com/2014/01/containsx-finding-if-a-value-in-table-1-has-a-matching-value-in-ta...

 

Hope this can be of any help to other users as well

A.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@aabati 

I assumed there is a relationship between the tables, you would need to first split the description column by "|“.  Then create a calculated table using the below function to filtered the matched results.

Table = CALCULATETABLE(TableA,FILTER(TableA,TableA[Discription.1] in VALUES(TableB[Lookup])||TableA[Discription.2] in VALUES(TableB[Lookup])||TableA[Discription.3] in VALUES(TableB[Lookup])))

 

description.JPG
BTW you could use CONCATENATE function to join them together if needed.



Best,
Paul

Thanks Paul for the replay

I understand you solution but in my case I dont have a defined and limited number of | (pipe delimiters). 

This is why I was looking for a kind of "Select like %' function.

Thanks

A.

aabati
Frequent Visitor

I think I found a solution in this article:

https://powerpivotpro.com/2014/01/containsx-finding-if-a-value-in-table-1-has-a-matching-value-in-ta...

 

Hope this can be of any help to other users as well

A.

trebgatte
Most Valuable Professional
Most Valuable Professional

You may want to look at this blog post as it is a similar data structure. https://marqueeinsights.com/how-to-work-with-sharepoint-multi-value-columns-in-power-bi/

 

What you don't have is a cross-reference between Table A and Table B. The post shows you how to easily do this and set up the relationships so that you can filter as described.

 

Hope this helps!

--Treb, Power BI MVP

 

Check out our Power BI blog posts at https://marqueeinsights.com/category/power-bi/

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors