Quicksight calculated field to extract domain from an email address

Viewed 115

In Amazon Quicksight Does anyone have experience on how to create a calculated field to extract the domain (everything afer the @ sign) from an email address?

In SQL I think it would look something like this: SUBSTRING ([Email], CHARINDEX( '@', [Email]) + 1, LEN([Email])) AS Domain

Thank you in advance!

1 Answers
  1. Click on Add (usually top left corner) --> ‘Add calculated field’

  2. Enter field name (top left) and search for function needed on the right hand side.

  3. Enter values inside the function

E.g. for substring it will be substring({Employee Name},1,2), where 1 is the start index and 2 is the length.

So, the new field ename1 will display on two characters from field “Employee Name”. The same can be extended to get emails.

-- Formula used for email_domain1 in image below

split({Email},'@',2)

-- Formula used for email2 in image below

substring({Email},locate({Email},'@',1)+1,strlen({Email})-locate({Email},'@',1))  

Refer images below for reference -

enter image description here

enter image description here

enter image description here

Related