Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
paul_ripley
Contributor III

How to use a variable in set analysis. Variable contains a list of values

Hello

I have set up a variable vInvTrusts that contains a list of values - see below

=match(portfolio ,'02502028','088000313','012700003','088300009','02505011','EX2000','IC2000')

I then want to use this variable in set analysis so I can exclude these values from the dataset.

I have tried the below but this doest exclude anything - what am I doing wrong

sum({$ <period = {">=$(vStartPeriod_CY)<=$(vEndPeriod_CY)"} , pl = {F01}, DataSource = {Agresso}, entity = {0005,0010,0011,0177,0348,0502,0002,0413,0522},portfolio -= {$(vInvTrusts)} >} IS_Investment_GBP )*-1

Many thanks Paul

Labels (2)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: How to use a variable in set analysis. Variable contains a list of values

No, not with such function, at least not with this kind of syntax -  it was meant just as a list of strings.

- Marcus

4 Replies
MVP & Luminary
MVP & Luminary

Re: How to use a variable in set analysis. Variable contains a list of values

If your variable contained:

'02502028','088000313','012700003','088300009','02505011','EX2000','IC2000'

it should work.

- Marcus

paul_ripley
Contributor III

Re: How to use a variable in set analysis. Variable contains a list of values

Hi Marcus

The variable vInvTrust I set up as below

So you think it should work?

=match(portfolio ,'02502028','088000313','012700003','088300009','02505011','EX2000','IC2000')

MVP & Luminary
MVP & Luminary

Re: How to use a variable in set analysis. Variable contains a list of values

No, not with such function, at least not with this kind of syntax -  it was meant just as a list of strings.

- Marcus

paul_ripley
Contributor III

Re: How to use a variable in set analysis. Variable contains a list of values

Many thanks for your help