Forum Discussion
Search text string within column
- Anonymous9 years ago
Interesting...
I've found this in the DAX reference for SEARCH:
"If the find_text cannot be found in within_text, the formula returns an error. This behavior is like Excel, which returns #VALUE if the substring is not found. Nulls in within_text will be interpreted as an empty string in this context."
So your "IFERROR" takes care of these cases where the "span" is not found.
I think it's the way to do it.
Maybe a semicolon is the issue....
Try comma instead:
Coluna 2 = SEARCH("span",'order_product'[order_product_name])
- webportal9 years ago
Impactful Individual
Thanks, but no.
We use semicolons here to separate argument formulas.
I found that if I use:
Coluna 2 = IFERROR(SEARCH("span",'order_product'[order_product_name]); BLANK())It works, although it doesn't make a lot of sense to me.
- Anonymous9 years agoNot applicable
Interesting...
I've found this in the DAX reference for SEARCH:
"If the find_text cannot be found in within_text, the formula returns an error. This behavior is like Excel, which returns #VALUE if the substring is not found. Nulls in within_text will be interpreted as an empty string in this context."
So your "IFERROR" takes care of these cases where the "span" is not found.
I think it's the way to do it.