Skip to main content
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?