Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having trouble being able to use a variable I have created in my set analysis expression. Please assist. I have tried numerous ways and have not been successful.
Variable Name and Definition:
vFacilityName = concat(DISTINCT chr(34) & "Facility Name" & chr(34),',')
(When I use my variable (i.e. $(vFacilityName) ) as an expression in a text object, it does work.)
However, I'm unable to do so in my set analysis expression:
Attempt 1: count({$<"Facility Name"={'$(=vFacilityName)'}>}distinct Patient_ID)
Attempt 2: count({$<"Facility Name"={'$(vFacilityName)'}>}distinct Patient_ID)
Attempt 3: count({$<"Facility Name"={"$(vFacilityName)"}>}distinct Patient_ID)
Attempt 4: count({$<"Facility Name"={"$(=vFacilityName)"}>}distinct Patient_ID)
And several other attempts and changing syntax.
Please assist this is definitely giving me some trouble.
Thank you.
It may depend on how you defined your variable, with or without a leading equal sign:
vFacilityName
=concat(DISTINCT chr(34) & "Facility Name" & chr(34),',')
Then
count({$<"Facility Name"={'$(vFacilityName)'}>}distinct Patient_ID)
should work, IMO.
Create a straight table chart with this expression and Facility Name as dimension and then hover with the mouse over the expression header. It should show the expression with the variable expanded.
It may depend on how you defined your variable, with or without a leading equal sign:
vFacilityName
=concat(DISTINCT chr(34) & "Facility Name" & chr(34),',')
Then
count({$<"Facility Name"={'$(vFacilityName)'}>}distinct Patient_ID)
should work, IMO.
Create a straight table chart with this expression and Facility Name as dimension and then hover with the mouse over the expression header. It should show the expression with the variable expanded.
What are the values of facility name
Values of Facility Name field were: Hospital 1, Hospital 2, etc...
Values of Variable were: "Hospital 1", "Hospital 2", etc.
variable
=concat(DISTINCT chr(34) & [Facility Name] & chr(34),',')
Expression
=count({$<[Facility Name]={$(vFacilityName)}>}distinct Patient_ID)