cancel
Showing results for 
Search instead for 
Did you mean: 

How to get domain name from email address in a webi 4.2 report?

former_member633510
Discoverer
0 Kudos
I have email addresses like use@gmail.com,user2345@ymail.com,user3@hotmail.com etc. I want a variable formula in webi report  that will trim user names and .com and return output as gmail,ymail,hotmail

Like below.But in webi I cant use instr/charindex/substring_index.
select(SUBSTRING_INDEX(SUBSTR(email, INSTR(email,'@')+1),'.',1))as a,count(*)as c
FROMUsergroupby a orderby c desc;

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_sonawane
Active Contributor
0 Kudos

Hi,

We have to create a below variable

domainwith.com = Substr([email]; Pos([email];"@")+1;Length([email]))

Domainname =Substr([domainwith.com];0;Pos([domainwith.com];".")-1)

Answers (0)