Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
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)

 

 

View solution in original post

brucejensen
Contributor III
Contributor III
Author

That works! Thanks!