Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
timsworldroamer
Partner - Contributor III
Partner - Contributor III

Set Analysis using GetPossibleCount

Hi,

I'm trying to display a field (Item) in a listbox for only certain values that have more than 2 values from another field associated with it. See the load script below:

CompanyTable:

Load * inline

[

Item, Object

Item1, Object1

Item2, Object1

Item2, Object2

Item3, Object1

Item3, Object2

Item3, Object3

Item4, Object1

Item4, Object2

Item4, Object3

Item4, Object4

];

In this case I want to display Items that have more than two Objects associated with it, i.e. Item3 and Item4. How would I go about doing that using Set Expression? Is it possible to do so with GetPossibleCount? I have the follow but it doesn't seem to be working:

=Item & ' - ' & Count({<Item={"GetPossibleCount(Object)>2"}>}Object)

Thanks in advance for your help.

1 Solution

Accepted Solutions
JonnyPoole
Employee
Employee

How about this:

=if( aggr(count(DISTINCT Object),Item) >1, Item)

Untitled.png

View solution in original post

2 Replies
JonnyPoole
Employee
Employee

How about this:

=if( aggr(count(DISTINCT Object),Item) >1, Item)

Untitled.png

timsworldroamer
Partner - Contributor III
Partner - Contributor III
Author

Thank you Jonathan, this works. Appreciate the help.