Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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
Former Employee
Former Employee

How about this:

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

Untitled.png

View solution in original post

2 Replies
JonnyPoole
Former Employee
Former 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.