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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Count Non Specific Rows

Hi 

 

I am looking to understand how i can count the number of rows in a column where the string value does not fully match but contains the string specified in the function.

 

For example, this is one of the cells in my dataset. ["TEN010 - Postcode","TEN008 - Address 5","TEN002 - Name"]. If i wanted to count the row if it contained the word "Postcode" in it, how would i go about doing this as the cell does have the word postcode in it, but it's only a small part of the entrie cell? 

 

Any advice will be greatly appreciated.

 

Many thanks 

 

Nathan

1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

Try creating a measure

 

Contains Postcode = COUNTAX(FILTER('Table', CONTAINSSTRING('Table'[Text], "Postcode")),'Table'[Text])
 
1.jpg
 
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

3 REPLIES 3
harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

Try creating a measure

 

Contains Postcode = COUNTAX(FILTER('Table', CONTAINSSTRING('Table'[Text], "Postcode")),'Table'[Text])
 
1.jpg
 
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous
Not applicable

Thank you @harshnathani, This worked well!!

 

amitchandak
Super User
Super User

@Anonymous , Not very clear , you can use search or contains string

Example of column

if(search("Postcode",Table[column1],1,0)>0,1,0)
if(CONTAINSSTRING(Table[column1],"Postcode"),1,0)


Refer : https://www.poweredsolutions.co/2019/03/26/fuzzy-matching-in-power-bi-power-query/

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
December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.