CONTAINSSTRING, CONTAINSSTRINGEXACT – finds text string in another text string (DAX – Power Pivot, Power BI)
CONTAINSSTRING is a function, verifying, whether there is some textstring. CONTAINSSTRINGEXACT works similarly but is case sensitive.
It is simple. If there is “small pink pig” in column Item, then this:
- Contains pig = CONTAINSSTRING(List1[Animal];"pig")
returns True. On the other hand this:
- Contains frog = CONTAINSSTRING(List1[Animal];"frog")
These functions are quite missing in Excel (outside DAX), where have to be replaced by complicated combination like:
Hi, can you use this to find text from one column in another column in the same table, IE reference the row and column instead of using a boolean?
“These functions are quite missing in Excel ” – have you tried the “FIND” function? Maybe learn a little excel before you decide what is missing. Granted find is case insensitive, but honestly I prefer it that way!
Yes, you can use FIND – but then you need something like IFERROR, ISNUMBER etc. to get TRUE or FALSE result.