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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
WilliamAzevedo
Helper III
Helper III

Filter Table visual based on strings

Hello, everyone.

 

Is it possible to filter rows in a Table visual (or similar) based on text strings, preferably multiple strings? I have the following visual:

WilliamAzevedo_0-1680096429042.png

And I would like this visual it to show only rows with defined strings, e.g. "idoso", "furto", "com risco".

 

Thank you all in advance!

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @WilliamAzevedo ,

 

If your search criteria is constant, you may try the following DAX measure. Anything that is not blank matches any of the text string. Just change the text strings accordingly. Also attached is a sample pbix for your reference.

Filter = 
VAR CriteriaTable =
    DATATABLE ( "Criteria", STRING, { { "poca" }, { "santana" }, { "com risco" } } )
RETURN
    COUNTROWS (
        FILTER (
            CriteriaTable,
            SEARCH ( [Criteria], SELECTEDVALUE ( Data[Column2] ), 1, 0 )
        )
    )

danextian_0-1680099549078.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

7 REPLIES 7
danextian
Super User
Super User

Hi @WilliamAzevedo ,

 

If your search criteria is constant, you may try the following DAX measure. Anything that is not blank matches any of the text string. Just change the text strings accordingly. Also attached is a sample pbix for your reference.

Filter = 
VAR CriteriaTable =
    DATATABLE ( "Criteria", STRING, { { "poca" }, { "santana" }, { "com risco" } } )
RETURN
    COUNTROWS (
        FILTER (
            CriteriaTable,
            SEARCH ( [Criteria], SELECTEDVALUE ( Data[Column2] ), 1, 0 )
        )
    )

danextian_0-1680099549078.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Ok, I saw it: I forgot to put the columns in the visual 🤣.

 

Thank you very much, that's what I needed!

You can the measure to the visual filter tile and filter it from there so it doesn't show in your table . [Measure] is not empty/blank





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Done and it worked! Thank you again!

Hi! I tried that and the visual gave me no result. There's how I did it:

WilliamAzevedo_0-1680100829703.png

Did I do anything wrong? Did I miss anything?

amitchandak
Super User
Super User

@WilliamAzevedo , Are looking for a search kind of option

Try Text Filter

https://appsource.microsoft.com/en-us/product/power-bi-visuals/WA104381309?src=office&tab=Overview

 

 

Text Filter Slicer and how to search on Multiple columns: https://youtu.be/RbeZRJ3uAZE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for your answer! It doesn't fit my needs, since the search is limited to a single term, but it got me to think: is it possible to do that filtering using a measure, or through a new column using DAX?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.