Beast Mode Calculation for Specific Email Domain

I have a column called Owned by Email and I want to create a calculated field that displays "Yes" if the email address is @mydomain. Two part question, would that be accomplished better with a dataflow or would a Beast Mode shared on the dataset work as well?  To clarify, there are half a million rows of data in the dataset.

 

Thanks in advance

Michael

Best Answers

  • MarkSnodgrass
    Answer ✓

    You could do this pretty easily in a beast mode with like this:

    CASE WHEN `emailaddress` LIKE '%@mydomain%' THEN 'Yes'
    ELSE 'No' 
    END

    If you have Magic ETL 2.0, then you can use the formula tile and include this in there and that would work well. If you think you might need to edit this formula often, making it a beast mode might make more sense as people find that more accessible. 

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • GrantSmith
    GrantSmith Coach
    Answer ✓

    As a minor tweak I'd recommend not including the wildcard at the end as it might cause incorrect matching. For example if your domain was "google.co" it would also capture "google.com".

     

    CASE WHEN `emailaddress` LIKE '%@mydomain' THEN 'Yes'
    ELSE 'No' 
    END

     

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**

Answers

  • MarkSnodgrass
    Answer ✓

    You could do this pretty easily in a beast mode with like this:

    CASE WHEN `emailaddress` LIKE '%@mydomain%' THEN 'Yes'
    ELSE 'No' 
    END

    If you have Magic ETL 2.0, then you can use the formula tile and include this in there and that would work well. If you think you might need to edit this formula often, making it a beast mode might make more sense as people find that more accessible. 

    **Check out my Domo Tips & Tricks Videos

    **Make sure to <3 any users posts that helped you.
    **Please mark as accepted the ones who solved your issue.
  • GrantSmith
    GrantSmith Coach
    Answer ✓

    As a minor tweak I'd recommend not including the wildcard at the end as it might cause incorrect matching. For example if your domain was "google.co" it would also capture "google.com".

     

    CASE WHEN `emailaddress` LIKE '%@mydomain' THEN 'Yes'
    ELSE 'No' 
    END

     

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**