Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nira
Contributor III
Contributor III

Set analysis with multiple conditions on same field

Hi,

This is my current expression used to calculate the percent of total cases for patients living outside the current region selected.

=Num(count({<patient_region-={'$(vCurrentRegion)'}>}patient_id)/COUNT(TOTAL {< patient_region-={'$(vCurrentRegion)'}, patient_province , admission_category, patient_region>} patient_id),'#,##0%')

in the set analysis used for the COUNT TOTAL expression, i included patient_region twice. This is because i still want it to calculate the total cases for outside the current region selected, however, i also want the kpi to ignore the patient region filteri have in the dashboard. Since i am trying to use the same field (patient_region) twice in the set analysis, it is not working. How can i fix this?

nira_0-1644524645043.png

 

2 Replies
rubenmarin

Hi, maybe with:

COUNT(TOTAL {< patient_region=E({<patient_region={'$(vCurrentRegion)'}>}), patient_province , admission_category>} patient_id)

OR: COUNT(TOTAL {<patient_province , admission_category, patient_region>-<patient_region={'$(vCurrentRegion)'}>} patient_id)

nira
Contributor III
Contributor III
Author

I tried both of these but it is including the current region selected in the total count, however, i am trying to exclude it from the calculation.