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: 
Anonymous
Not applicable

Only one-to-one

Use Case:

EmployeeSalesRegion
A500Americas
B600Europe
B300Asia
B400Americas
C200Americas
C500Europe

In my Set analysis statement, I'm interested in Employees who made sales in Americas only. A above, discard B and C.

My set expressions is little complex and Only() doesn't seem to work, is there an alternate ?

Thank you.

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

This will look at only the records with 'Americas' and the employees who have sold to one region

sum( {$<Region={'Americas'},Employee={"=count(distinct Region)=1"}>}  Sales)

View solution in original post

3 Replies
JonnyPoole
Former Employee
Former Employee

This will look at only the records with 'Americas' and the employees who have sold to one region

sum( {$<Region={'Americas'},Employee={"=count(distinct Region)=1"}>}  Sales)

Anonymous
Not applicable
Author

Thanks Jonathan.

I have another slightly different requirement.

Is it possible via Set Expression to look for Employees who made Sales in Europe and/or Asia but exclude all those who made Sales in America, even if they made in Europe and/or Asia.

JonnyPoole
Former Employee
Former Employee

You can using the e() function. I had to augment your sample but here is the result:

sum( {$<Employee=e( {1<Region={'Americas'}>})>} Sales)

Capture.PNG.png