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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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