Forum Discussion
Count if DAX measure needed for 'Contains' text filter
- 2 years ago
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.
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.
This worked perfectly!
Thank you so much