Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mskusace
Creator
Creator

Count based on another Field

I would like to count a column called "ID" based on the criteria of another column "Color". The problem is, I have another table that is associated and has the same "ID", but multiple instances because it has another field called "ROLE".

I would like to count the UNIQUE "ID"s based for "Color" =  "RED". It is actually the word "RED", so text.

The table below would yield 3 and 50%. How can I do this? I am trying to use the KPI chart.

IDColor
WA13GREEN
WB14RED
WC15ORANGE
ZS15GREEN
DB09RED

 

The other associated table

IDROLEUSER
WA13MANAGERUSER1
WA13SUPERVISORUSER2
WA13ANALYSTUSER3
WB14ANALYSTUSER3
WB14MANAGERUSER4
WC15SUPERVISORUSER5
WC15MANAGERUSER6
WC15SECRETARYUSER7
ZS15MANAGERUSER4
ZS15ANALYSTUSER8
ZS15SUPERVISORUSER2
ZS15SECRETARYUSER9
DB09SECRETARYUSER10
DB09SECRETARYUSER11
DB09ANALYSTUSER12
20 Replies
abhi1693r
Contributor II
Contributor II

I used Count( DISTINCT FIELD1&'|'&FIELD2) and it worked!

Thanks for all the help, really learnt a lot in the process.