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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Count based on other information

Hi All.

I am trying to count the number of customers if the condition is met, but I don't get the correct answer.

Ex.

Pol_noinfo_nocustomers
1122312515A
123311223B
105053105053C

I used:

if(Pol_no = info_no),count(distinct customers))

What else can I try to give me the answer of 2?

16 Replies
sunny_talwar

Try this:

=Count({<customers = {"=Pol_no = info_no"}>}DISTINCT customers) or

=Count(DISTINCT If(Pol_no = info_no,  customers))

Anonymous
Not applicable
Author

Because the condition has to be met, so only some of the customers should be counted

sunny_talwar

Attaching a sample to look at.

Capture.PNG

HTH

Best,

Sunny

stigchel
Partner - Master
Partner - Master

Have you tried my answer?

=Count({<Pol_no=P(info_no)>} customers)

sunny_talwar

I just did Piet‌ and it works like a charm

Anonymous
Not applicable
Author

Thank you, it workes

sunny_talwar

No problem