Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

May be this:

Dimesnion:

[Healthcare Number Exists]

Expression:

Count(DISTINCT [Patient Name])


Capture.PNG

View solution in original post

2 Replies
sunny_talwar

May be this:

Dimesnion:

[Healthcare Number Exists]

Expression:

Count(DISTINCT [Patient Name])


Capture.PNG

Not applicable
Author

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