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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
ncarter27
Partner - Contributor
Partner - Contributor

OR flag in Set Analyis

I need to write a statement that in English correlates to if a patient has a hospice consult or a palliative consult, then count the encounter id. 

There are apprx 19000 palliative consults in our system and about 2000 hospice consults.

=Count(distinct{$<Palliative_Consult_Flag={1}>+<Hospice_Consult_Flag={1}>} Encounter_ID)

There is some overlap between the two, around 2K. 

But when I write this expression, I get 1.4K results, so I know that's not right. 

From what I've read, + should or the two statements together, but that's not the results I'm getting, so is something wrong with my syntax? 

Labels (1)
2 Replies
Chanty4u
MVP
MVP

why cant do like below?

=Count({$<Palliative_Consult_Flag={1},Hospice_Consult_Flag={1}>} distinct Encounter_ID)

gp_oconnor
Partner - Contributor III
Partner - Contributor III

Syntax looks OK to me.  I created a small sample app to test [attached] and it gives the results you are after.  Maybe something to do with the data model or the potential values in those flag fields?