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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggregation in Variable

Hi folks,

i am stuck with below issue and have tried lot of different stuff but cant solve it.

I am Plotting a Bar graph with below details

Dimensions

1) Facility and 2) Days_To_Readmit

Measure

1) count(encounters) per days_to_Readmit / Count(encounter) group by Facility for all Days_to_readmit

I created variable which will store denominator part and give me total encounter, issue is variable is giving me total combining all the facility present, where as i want it by each facility.

e.g. if total encounters for Facility 1 is 20 and Facility 2 is 100 than bar should be plotted for each facility as Numerator of Facility1/20 and Numerator of Facility2/100 right now it is coming as Numerator of Facility1/120 and Numerator of Facility2/120

i have attached the app as well, your help would be much appreciated.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Variable definition:

Aggr(NODISTINCT count({<DISCHARGE_DATE_DT={">=$(vMinDate)<=$(vMaxDate)"},INDEX_READMIT_FLAG={I}, DAYS_TO_READMIT=>}ENCOUNTER_QO_KEY),Facility_Name)

Note: no '=' in front.

And '$' sign before variable name in the expression like: .......TER_QO_KEY)/$(Encounter_Count)

View solution in original post

4 Replies
tresesco
MVP
MVP

Corrected the variable definition. PFA

Not applicable
Author

Hey Tresesco,

Thanks for reply, i am not able to open your document.

Please let me know what changes you have done.

Regards

tresesco
MVP
MVP

Variable definition:

Aggr(NODISTINCT count({<DISCHARGE_DATE_DT={">=$(vMinDate)<=$(vMaxDate)"},INDEX_READMIT_FLAG={I}, DAYS_TO_READMIT=>}ENCOUNTER_QO_KEY),Facility_Name)

Note: no '=' in front.

And '$' sign before variable name in the expression like: .......TER_QO_KEY)/$(Encounter_Count)

Not applicable
Author

Thanks tresesco really appreciate your help.