Forum Discussion
Anonymous
8 years agoNot 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...
- 8 years ago
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.
Floriankx
8 years agoSolution 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
- Anonymous8 years agoNot 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.
- Floriankx8 years agoSolution Sage
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.
- Anonymous8 years agoNot applicable
It Worked Thanks Florian.. You are great..