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

How to pass a value from dashboard to variable definition?

Hi experts,

          I would like to pass a value from a user defined list box of the dashbouard to a variable definition in order to avoid designing multiple charts with only one parameter different. For example, I have a variable defined as count({$<Metric={1}, Intervention={0} >}HospitalAccountID), I hope I can pass different values obtained from list in the dashboard to Metrics such as CXR, Readmission, orderSet. In this way, I only need ONE chart instead of THREE charts on the dashboard.

Is this passible? Thanks

Longmatch.

12 Replies
Not applicable
Author

Jason,

         Do you have time to look at my sample? Any ideas?

Thanks

Longmatch

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Here you go.

Not applicable
Author

Thank you very very much. This feature cannot be added into my project without your helps. You are genius!!!

I do have a question for you. It looks like that the value selected in list box cannot be passed to variable directly- testVariable=sum(ONLY(%Metrics))  does not work. The definition has to be ='sum(' & ONLY(%Metrics) & ')' and then it is converted to a value by using $() function. What is the logic here? I tried to merge the definition together as =$('sum(' & ONLY(%Metrics) & ')'). It does not work. Could you give me some explanations?

Thanks