Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
I think you should use
Num(
Count({<patient_region=E(patient_region)>} distinct patient_id)/
Count({<patient_region= >} distinct total patient_id),
'0%'
)
I made some mock-up data, and selected region=B:
As you can see, the second measure (third column) correctly picks up number of patient_ids from regions outside current selection. And the last column calculates the percentages.
What does {<patient_region=E(patient_region)>} translate to?
This doesn't seem to produce any results. Don't I still need to add this in the set analysis: {<patient_region-={'$(vCurrentRegion)'}>}? the variable vCurrentRegion corresponds to =only(facility_region) which is the region of the hospital selected.
This is working, however, when i filter the sheet by a patient_region, the % does not change.
=Num(
Count({<patient_region=E(facility_region)>} distinct patient_id)/
Count({<patient_region=E(facility_region), patient_province >} distinct total patient_id),
'0%'
)