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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
nmckeown1
Helper II
Helper II

Count if DAX measure needed for 'Contains' text filter

I need to create a measure that will calculate the rows containing text, but the text in one cell has many other wordds. I 

I can use the advanced filter option for 'Contains' and it will populate the correct amount including all text that contains atleast the desired text:

nmckeown1_0-1722949476773.png

 

 

For example

I need to create a dax measure that allows me to countIF the text contains "blocking"

I have a column that contains the data:

Blocking

Exclusion

Blocking;Exclusion;Services

Blocking;Services;Debt

 

So all cells containing ATLEAST 'Blocking' should = 3

 

I have tried:
Calculate(
[TotalClients],filter ( 'table','table, signposted IN {"Blocking"} ) 
)

 

Any ideas?

1 ACCEPTED SOLUTION
Wilson_
Memorable Member
Memorable Member

Hi nmckeown1,

 

Try this:

VAR BlockingFilter =
FILTER (
    VALUES ( 'Table'[sign_posting] ),
    SEARCH ( "Blocking", 'Table'[sign_posting],, -1 ) <> -1
)

RETURN
CALCULATE (
    [Total Clients],
    BlockingFilter
)

 

(P.S.: Don't filter a whole table in your FILTER function. That tends to result in poor performance because you're retrieving columns you don't actually need.)


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





View solution in original post

3 REPLIES 3
Wilson_
Memorable Member
Memorable Member

Hi nmckeown1,

 

Try this:

VAR BlockingFilter =
FILTER (
    VALUES ( 'Table'[sign_posting] ),
    SEARCH ( "Blocking", 'Table'[sign_posting],, -1 ) <> -1
)

RETURN
CALCULATE (
    [Total Clients],
    BlockingFilter
)

 

(P.S.: Don't filter a whole table in your FILTER function. That tends to result in poor performance because you're retrieving columns you don't actually need.)


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

 

P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.




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

Proud to be a Super User!





This worked perfectly!

Thank you so much

Awesome, thanks for the update. Happy to help! 😄




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

Proud to be a Super User!





Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.