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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jvanarsdale
Frequent Visitor

How do I count rows and exclude certain text?

I see lots of answers on how to count rows containing certain text, but I need to count rows of text that do not contain the word "Open". How do I do this?

1 ACCEPTED SOLUTION

Yes! That worked! Thank you SO much! Been struggling all morning on that. I am a relatively new user.

View solution in original post

6 REPLIES 6
jvanarsdale
Frequent Visitor

Unfortunately, this didn't work. Is there another piece to the code?

jvanarsdale_0-1685625566170.png

 

I just sent you the FILTER (which you need to use inside CALCULATE).

 

Create a new measure like this :

 

YourMeasure = CALCULATE( COUNT('YourTable'[YourColumn]),FILTER('YourTable', NOT(CONTAINSSTRING('YourTable'[YourColumn], "Open")))

 

Have a nice day.

Yes! That worked! Thank you SO much! Been struggling all morning on that. I am a relatively new user.

Glad it is working well 🙂

pratyashasamal
Super User
Super User

Hi @jvanarsdale ,
Please try this .
Price Count = IF( 'Product'[List Price] != "Open", COUNTROW( 'Product'[Text] ))
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C





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

Proud to be a Super User!





Timuran
Resolver I
Resolver I

Hello @jvanarsdale ,

 

You can use NOT() in your filter.

 

Would looks like :

 

 

 

FILTER('YourTable', NOT(CONTAINSSTRING('YourTable'[YourColumn], "Open"))

 

 

The measure would be :

 

 

YourMeasure = CALCULATE( COUNT('YourTable'[YourColumn]),FILTER('YourTable', NOT(CONTAINSSTRING('YourTable'[YourColumn], "Open")))

 

Have a nice day

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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