Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlikerino
Contributor II
Contributor II

Chart with emails containing different domain names

Hello, trying to do a chart which contains different domain names like:

gmail.com
student.domain.com
institute.domain.com
domain.com

 I'm not sure if i should do a measure or create a new dimension
I'm trying to figure out how to write the expression as well and should I' do a dimension for each or would i be able to fit everything in one expression?
if(Count(Email = "*domain.com"),1,
if(Count(Email="*student.domain.com"),2,
If(Count......
and so on

Would one also be able to group all the emails having the same domain name? if some have student.domain and institute.domain but they share the same domain name and I would like to group those together in to one group?

Would Appreciate the help thanks.  

1 Solution

Accepted Solutions
tm_burgers
Creator III
Creator III

I would create a new table in your data; 

 

[EmailDomainCounts]:

Load

SubField([Email] , '@' , -1) as Domain,

count(SubField([Email], '@' , -1)) as DomainCount

Resident  YourContactTable

group by SubField('Email' , '@' , -1);

 

 

 

View solution in original post

3 Replies
tm_burgers
Creator III
Creator III

I would create a new table in your data; 

 

[EmailDomainCounts]:

Load

SubField([Email] , '@' , -1) as Domain,

count(SubField([Email], '@' , -1)) as DomainCount

Resident  YourContactTable

group by SubField('Email' , '@' , -1);

 

 

 

Qlikerino
Contributor II
Contributor II
Author

Thanks for your reply!

I guess one does this in the data load editor?

I just don't understand what MyContactTable would be?

Thanks!

Qlikerino
Contributor II
Contributor II
Author

I figured it out, thank you!

I created it in a new section instead of using the current one and then everything loaded properly