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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Multiple search text in if function

Hi,

 

Have data in a column as 

Category
I need a help with PR approval
I need help creating a Purchase Request (PR)
I need help with a BuyNow contract
I need help with a new supplier contract or sourcing event
I need help with an intervention (approval) group in BuyNow
I need help with IQN Training/ Technology
I need information on Process and Policies
I need information on procurement Corporate Citizenship policies and requirements
I need to change the PR/PO
I need to Enable a Contractor
I need to exit
I need to find a Contractor
I Need to manage

 

in new column would like to have if above column contains help then "Help" or Change then "Change" .......

So final column should be like this 

 

New_Category

Help
Information
Change
Enable
Exit
Contractor
Manage
Find


Any other solution would be great.Getting error when I have have tried with if(search(column,"Help"),"Help", if(search(Column,"Change"),"Change"......................

Thanks 

Murali

1 ACCEPTED SOLUTION

Hello,

 

you can try switch for your calculated column:

SWITCH(
 FALSE(),
  ISERROR(SEARCH("Find",[Category])),"Find",
  ISERROR(SEARCH("Enable",[Category]),"Enable",
  "New")

SEARCH only works with row context, so it is not recommended to be used in Measures.

View solution in original post

4 REPLIES 4
Floriankx
Solution Sage
Solution Sage

Hello,

 

SEARCH is probably the best way to do it.

Can you give us your full formula and the occuring error message?

 

Best regards

Anonymous
Not applicable

THhis is the Dax formula i tried

Categ_New = IF(SEARCH("Find",'Raw Data Report'[Category]),"Find",IF(SEARCH("Enable",'Raw Data Report'[Category]),"Enable","New") )

 

Getting Error message: the search Text provided to function 'SEARCH' could not be found in the given text.

Hello,

 

you can try switch for your calculated column:

SWITCH(
 FALSE(),
  ISERROR(SEARCH("Find",[Category])),"Find",
  ISERROR(SEARCH("Enable",[Category]),"Enable",
  "New")

SEARCH only works with row context, so it is not recommended to be used in Measures.

Anonymous
Not applicable

It Worked Thanks Florian.. You are great..

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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