Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
brucejensen
Contributor III
Contributor III

Multiple Values for Variable in Set Analysis

I have a variable vsxs1 that is used in the expression:

=Sum ({$<[Location Name]={'$(vsxs1)'}>}[Rent Amount])

This works fine if only one Location Name has been selected. Example vsxs1 = Building A

But it does not work if more than one Location Name has been selected. Example vsxs1 = Building A, Building B

Hoping there is an easy fix for this?

Labels (1)
1 Solution

Accepted Solutions
idogridish2
Creator II
Creator II

Use it like this:

=Sum ({$<[Location Name]={$(vsxs1)}>}[Rent Amount])

 

and inside the variable:

=concat( distinct chr(39) & [Location Name],chr(39) &',') & chr(39)

 

 

View solution in original post

4 Replies
brucejensen
Contributor III
Contributor III
Author

Sorry but this doesn't work.

idogridish2
Creator II
Creator II

Use it like this:

=Sum ({$<[Location Name]={$(vsxs1)}>}[Rent Amount])

 

and inside the variable:

=concat( distinct chr(39) & [Location Name],chr(39) &',') & chr(39)

 

 

brucejensen
Contributor III
Contributor III
Author

That works! Thanks!