Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Highlighted
New 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
Highlighted
Contributor II

Re: Multiple Values for Variable in Set Analysis

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
Highlighted
Contributor II

Re: Multiple Values for Variable in Set Analysis

Highlighted
New Contributor III

Re: Multiple Values for Variable in Set Analysis

Sorry but this doesn't work.

Highlighted
Contributor II

Re: Multiple Values for Variable in Set Analysis

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

Highlighted
New Contributor III

Re: Multiple Values for Variable in Set Analysis

That works! Thanks!