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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
DJsummers
Helper I
Helper I

Return count of cells that contain a certain text

Hi, 


I have a very large table and the part I am interested in is the value_2 column

DJsummers_0-1626100348636.png

I would like a measure where I can search and count this column for any mentions of "House 1" and then a seperate measure to search for any mentions of "House 2", etc etc.

Once I have this, I can then use the built in basic filters to get what I want but I am falling down here. I have tried varying formulas on these forums but I can't make any work for me.

I am also too embarassed to say but the latest one I have tried is:

DJsummers_1-1626100630523.png

Any help offered would be greatly appreciated!
Dan.

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

You can create a measure with below code

 

 Measure 3 = CALCULATE(COUNT(Search_data[value]),CONTAINSSTRING(Search_data[value],"house1")) 

 

My sample table data:-

 

Samarth_18_0-1626109102674.png  

Output:-

 Samarth_18_1-1626109121276.png

 

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

You can create a measure with below code

 

 Measure 3 = CALCULATE(COUNT(Search_data[value]),CONTAINSSTRING(Search_data[value],"house1")) 

 

My sample table data:-

 

Samarth_18_0-1626109102674.png  

Output:-

 Samarth_18_1-1626109121276.png

 

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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