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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
clarawang_12
Frequent Visitor

How to display count of search results with Text Filter and Text Slicer Filter

Dear Community,

 

I'm using Text Filter and Text Slicer Filter to search contents of power BI page, is there a way to show the count of search results? For example, search "Content A" in Text filter, and a card or message will show how many "Content A" in this page.

 

 

Kind regards,

Clara 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @clarawang_12 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675317243491.png

2. add a tabl visual with fields, and add  a text filter with field

vbinbinyumsft_1-1675317407630.png

3. create a measure with below dax formula

Measure =
VAR pt =
    SELECTEDVALUE ( 'Table'[Product] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), CONTAINSSTRING ( [Product], UPPER ( pt ) ) )
RETURN
    IF ( ISFILTERED ( 'Table'[Product] ), COUNTROWS ( tmp ), 0 )

4. add a card visual with measure

vbinbinyumsft_2-1675317523208.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

2 REPLIES 2
Anonymous
Not applicable

Hi @clarawang_12 ,

Please try below steps:

1. below is my test table

Table:

vbinbinyumsft_0-1675317243491.png

2. add a tabl visual with fields, and add  a text filter with field

vbinbinyumsft_1-1675317407630.png

3. create a measure with below dax formula

Measure =
VAR pt =
    SELECTEDVALUE ( 'Table'[Product] )
VAR tmp =
    FILTER ( ALL ( 'Table' ), CONTAINSSTRING ( [Product], UPPER ( pt ) ) )
RETURN
    IF ( ISFILTERED ( 'Table'[Product] ), COUNTROWS ( tmp ), 0 )

4. add a card visual with measure

vbinbinyumsft_2-1675317523208.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@clarawang_12 , if test filter is applied in page

 

then countrows(Table)

 

or countrows(Table, Table[Column], "_1", [Measure]))

 

should give you the filtered count.

 

Or try

 

CONTAINSSTRING and CONTAINSSTRINGEXACT: https://www.youtube.com/watch?v=XbgLGDvWdWQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=44

 

SEARCH and FIND: https://www.youtube.com/watch?v=mZt0HJw4gjQ&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=45

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.