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: 
MMachado
Contributor II
Contributor II

Count if a Count greater than

Hello everyone.

I've read many posts before write mine, but I had no success in my tries.

Objective: To count how many Codes in Column 'A'  have more than 1 distinct Code in Column 'B'.

So, in the example below we have codes 4850 and 4905 that have more than 1 distinct code in column 'B'.

I'd like to include this set analysis in a KPI. So it need to show '2' (for example below).

MMachado_0-1594850676320.png

Thanks a lot!

Marcelo.

Labels (3)
1 Solution

Accepted Solutions
Kushal_Chawda

try below

=count(distinct aggr(if(count(distinct B)>1,A),A))

View solution in original post

3 Replies
Kushal_Chawda

try below

=count(distinct aggr(if(count(distinct B)>1,A),A))
MMachado
Contributor II
Contributor II
Author

awesome, a answer too fast.
worked perfectly.
tks a lot

Kushal_Chawda

set analysis version

=count(distinct {<A={"=count(distinct B)>1"}>}A)