Beast Mode Calculation for Specific Email Domain

Reply
Yellow Belt

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


Accepted Solutions
Black Belt

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. 




**Make sure to like any users posts that helped you and accept the ones who solved your issue.**

View solution in original post


All Replies
Black Belt

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. 




**Make sure to like any users posts that helped you and accept the ones who solved your issue.**

View solution in original post

Black Belt

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 the heart icon**

**Did this solve your problem? Accept it as a solution!**
Announcements
New & Improved Dojo: Get excited for a new feel and additional features in the online community.

Site will be down February 4-5th for maintenance.

Launch coming February 8th!