Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenated string variable and Set Analysis

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.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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.

View solution in original post

4 Replies
swuehl
MVP
MVP

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.

Anil_Babu_Samineni

What are the values of facility name

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Values of Facility Name field were: Hospital 1, Hospital 2, etc...

Values of Variable were: "Hospital 1", "Hospital 2", etc.

vinieme12
Champion III
Champion III

variable

=concat(DISTINCT chr(34) & [Facility Name] & chr(34),',')


Expression

=count({$<[Facility Name]={$(vFacilityName)}>}distinct Patient_ID)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.