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

View all the Fabric Data Days sessions on demand. View schedule

Reply
StuartSmith
Power Participant
Power Participant

Wildcard or "Contains" option in Filter Measure

I currently have the below code that will only calculate values that are "Yes"

 

Var All_Yes = CALCULATE(COUNT('Services'[Category]),FILTER(ALL('Services'),'Services'[Category]=MAX('Services'[Category])&&'Services'[Status]="Yes"))
 
I now need it to take into account all values containing "Yes". I tried serching for wildcards, SEARCH, FIND, etc. but couldnt find any information that helps me and therefore calling on your knowledge.  
1 ACCEPTED SOLUTION
StuartSmith
Power Participant
Power Participant

Well, I think he found out... adding "CONTAINSSTRING"

Var All_Yes ? CALCULATE(COUNT('Services'[Category]),FILTER(ALL('Services'),'Services'[Category]-MAX('Services'[Category])&&CONTAINSSTRING('Services'[Status],"Yes")))
Just check that the figures are correct.

View solution in original post

2 REPLIES 2
StuartSmith
Power Participant
Power Participant

Well, I think he found out... adding "CONTAINSSTRING"

Var All_Yes ? CALCULATE(COUNT('Services'[Category]),FILTER(ALL('Services'),'Services'[Category]-MAX('Services'[Category])&&CONTAINSSTRING('Services'[Status],"Yes")))
Just check that the figures are correct.

Hi @StuartSmith , glad that you have solved this problem by yourself, you may accept your post as a solution to close this topic thus others will find it quickly. Thanks a lot.

 

Best Regards,
Community Support Team _ Jing Zhang

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors