Forum Discussion

83dons's avatar
83dons
Icon for Helper III rankHelper III
1 year ago
Solved

Help with null values in creating a new column

I have a column of emails (called 'Main Email Address'). I have an add column step that works well to check the email addresses for any that do not look like email addresses and if so it just adds a ...
  • danextian's avatar
    danextian
    1 year ago

    Hi 83dons 

    Try the following

    let 
    check = 
    if Text.Contains([Main Email Address], "@") and Text.Contains(Text.Range([Main Email Address], Text.PositionOf([Main Email Address], "@")), ".") then [Main Email Address] else null
    try check otherwise null

     

    if [Main Email Address] = null then null else if Text.Contains([Main Email Address], "@") and Text.Contains(Text.Range([Main Email Address], Text.PositionOf([Main Email Address], "@")), ".") then [Main Email Address] else null