Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
walkasia
Contributor III
Contributor III

Set Analysis - creating a modifier based on count of distinct rows

I have a table of household ids and programs, as shown here:

 

ID Program
H1 Food
H1 Workforce
H1 Holiday
H2 Food
H2 Holiday
H3 Food

 

I want two KPIs: one that displays the number of households participating in exactly 2 programs and one that displays the number of households participating in more than 2 programs.  The below expresions are not working.  I am getting results that I cannot understand, sometimes the same household will show up in both KPIs. 

=Count({<[ID] ={"=count(distinct [Program])=2"}>}distinct[ID])

=Count({<[ID] ={"=count(distinct [Program])>2"}>}distinct[ID])

Is this even possible?  Where am I going wrong? 

TIA

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there!

The expressions appear to be valid. Perhaps the problem is in the combination of the expression and the dimension that you are using it with. If you can post a sample app and highlight your problem there, I'd be able to troubleshoot it for you...

Cheers,

View solution in original post

1 Reply
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there!

The expressions appear to be valid. Perhaps the problem is in the combination of the expression and the dimension that you are using it with. If you can post a sample app and highlight your problem there, I'd be able to troubleshoot it for you...

Cheers,