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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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