2 Replies Latest reply: Jun 1, 2016 1:08 PM by Nik Sitnikov RSS

    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
      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..