Forum Discussion

socialengaged's avatar
socialengaged
New Member
9 years ago
Solved

Concatenate IF with OR operator

hello everyone!  im almost new with powerbi, and i find it a great tool! I have an issue thou, I hope you can help me find out a solution:    when i create a Custom Query -> Custom Column, I add t...
  • v-jiascu-msft's avatar
    9 years ago

    Hi socialengaged,

     

    Try this formula please.

     

    =if (Text.Contains([Words], "cloud") or 
        Text.Contains([Words], "computing")) 
       and  
       (Text.Contains([Words], "analytics") or 
       Text.Contains([Words], "data") ) 
       then "Cloud|Analytics" 
       else if 
       (Text.Contains([Words], "cloud") or 
       Text.Contains([Words], "computing")) 
      and 
       not  (Text.Contains([Words], "analytics") or 
      Text.Contains([Words], "data") ) 
      then "Cloud" 
      else if  
      not (Text.Contains([Words], "cloud") or 
      Text.Contains([Words], "computing")) 
      and  
     (Text.Contains([Words], "analytics") or 
      Text.Contains([Words], "data") ) 
      then "Analytics" 
      else null

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards!

    Dale