Forum Discussion

webportal's avatar
webportal
Icon for Impactful Individual rankImpactful Individual
9 years ago
Solved

Search text string within column

I'm trying to find the position (in nr. of characters) of the word "span" in column "order_product_name" of table "order_product". For that, I'm using a calculated column with the formula: Coluna 2...
  • Anonymous's avatar
    Anonymous
    9 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.