Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Count measure based on distinct values of other measure in Qlik Sense

Hi everyone,

AssumeI have 3 columns in my source table:

Test PerformedPatient NameHealthcare Number Exists
X-RayJohnY
HistologyNancyN
X-RayNancyN
X-RayBobN
Blood SampleDanY

I want to count on the pie chart the number of people who have the Healthcare Number and who don't but only for distinct values of Patient's Name to avoid double-counting. So the output should be 2 Patients without Healthcare Number/2 Patients with Healthcare Number and not 3 Patients with Healthcare Number/2 Patients with Healthcare Number.

How can I make this work?

I was think using set expressions but I am not sure how the syntax works in this situation. Something like this makes sense but doesn't work: =count( { < distinct [Patient Name] > } [Healthcare Number Exists] )

Please help..

1 Solution

Accepted Solutions

Re: Count measure based on distinct values of other measure in Qlik Sense

May be this:

Dimesnion:

[Healthcare Number Exists]

Expression:

Count(DISTINCT [Patient Name])


Capture.PNG

2 Replies

Re: Count measure based on distinct values of other measure in Qlik Sense

May be this:

Dimesnion:

[Healthcare Number Exists]

Expression:

Count(DISTINCT [Patient Name])


Capture.PNG

Not applicable

Re: Count measure based on distinct values of other measure in Qlik Sense

Thanks so much for a lightening response, silly of me to not have figured it out.

Community Browser