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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
mterry
Helper V
Helper V

Text filter from another table

I have a very large table with street addresses, some of which start with variations of PO Box (i.e. P.O Box, PO. Box, P.O. BOX, etc.). I have another table that has (I think) all the variations in it, what I would like to do is to create a filter, ideally with DAX, that would allow me to filter all rows from one table if the text starts with the values in the filter table. I would ideally like to do this with DAX because there are other cases where I do want to load those addresses. I know I could duplicate the table, but my preference would be to do this with DAX, I'm just struggling with the syntax beacuse the values in the filter table aren't full values, it's just the beginning values of the addresses I need to filter out. I'm unable to share the actual data set, but there's a sample of the full data set with addresses along with the actual filter table I created below. After the filter was applied the only line from the sample date that would display would be Line4

 

Sample data:

SampleAddress 
Line1P.O Box 191
Line2P.O. Box 10716
Line3PO Box 17903568, Suite 10
Line41234 Main Street

 

Filter table:

Address Text Filter
P O BOX
P O BOX
P O. Box
P. O. Box
P.O BOX
P.O. Box
P.O.Box
P.O.Box
PO Box
P.O. Box
3 REPLIES 3
Padycosmos
Solution Sage
Solution Sage

Hope this helps:

Padycosmos_0-1677513945344.png

 

barritown
Super User
Super User

Hi,

 

If performance is not critical here, I can propose a brute force solution - you can try to CROSSJOIN your tables and then apply filtering.

 

Like that:

Filtering.png 

If performance matters, you may need a more elegant solution.

 

***Update***

 

Since you need the opposite - to find the rows that DON'T follow any of the filter patterns, the solution would be:

 

except.png

 

Okay I'll give that a try, thanks

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors