Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to translate Tableau conditional functions that use also contains function into Power Bi?

Hello,   I would like to create the following Tableau function into Powerbi.   IF [account]="A" and CONTAINS([Event category],"Form") or CONTAINS([Event category],"Email") or CONTAINS([Event c...
  • lbendlin's avatar
    5 years ago

    SEARCH("Form",[Event Category],,0)>0

     

    means "look for the string 'Form' in the field [Event Category], ignoring the collation. The search is starting from the first character.  If the substring is found, its starting position is returned (first character is at 1).  If the string is not found then 0 is returned.

     

    Search (something) > 0   is a boolean check that returns true if the substring was found, and false otherwise. This is based on the previous decision to equate "not found" with 0.