Forum Discussion

Alessandro-laba's avatar
5 years ago
Solved

If - Then - without Else

Hi everyone,    I have a marketing database with thousands of email addresses and company names and I import all these data in Power Bi.   Unfortunately our system doesn't talk with our CRM and t...
  • PhilipTreacy's avatar
    5 years ago

    Hi Alessandro-laba 

    If you are doing this in Power Query and creating a Custom Column, then you are checking an existing column to check the email address.  If you don't find the text you are searching for, the else can just output this unmodified column - for example

     

    if Text.Contains([Email_Address] , "@watersport.com") then "Water for Sport" else [Email_Address]

     

    Phil

  • AlB's avatar
    5 years ago

    HiAlessandro-laba 

    I'm not sure I understand fully. You can perhaps  do something like:

    = if Text.Contains([emailaddress], "@watersport") then  "Water for Sport"  else [emailaddress]

     

    Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

    Cheers