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
timoneill84
Frequent Visitor

dax formula help

Hi all

 

I'm just trying to modify a DAX formula which currently reads:-

 

check = IF(ISERROR(SEARCH("4x4",Claims[Vehicle Type])),1,0)

 

How do I get it to search for multiple text criteria instead of just 4x4? so say search for "4x4" OR "apples" and return 0 next to those rows?

 

Thanks

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @timoneill84

 

From the syntax of Search dax, SEARCH(<find_text>, <within_text>[, [<start_num>][, <NotFoundValue>]]) , there is only one find_text. So you may not search for multiple text by Search dax expression.

 

You could try to use the formula below to get your expected output.

 

check_ = if(SEARCH("apple",'Table1'[Type],,0)>0,0,IF(SEARCH("4*4",'Table1'[Type],,0)>0,0,1))

The output is below.

 

 Capture.PNG

 

 

If you need additional help please share some data sample and expected output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.