Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
julietotsch
Contributor II
Contributor II

Set Expression based on variable not working

I have multiple buttons.  When one of them is clicked, it will set a variable - vHospitalSystem - to a value.  I, then, want to use that value to select a column from a table and bring back that value:

HospitalSystem Target1 Target2
ABCM 25 35
DEFN 20 23

 

My expression is:

= sum({$<[HospitalSystem] = ${vHospitalSystem} >}[Target1])

 

I have checked that the variable is set to the correct Hospital System (ABCM).  I do not understand why it is bringing back 0 and not 25.

Labels (1)
2 Replies
RsQK
Creator II
Creator II

Hi, it's the syntax. Should look like this:

SUM({$<[HospitalSystem]={'$(vHospitalSystem)'}>}[Target1])
anat
Master
Master

What is the expression of vHospitalSystem?