Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jleberre
New Contributor

Remove selections in a set analysis using a variable

Hello

I would like to remove some selections in a set analysis, using a variable.

I tried this:

- the variable: vSelection = 'customer=,offer=,country=,city=' for example

- the set analysis: {<$(vSelection)>}

But it doesn't work (no selection removed).

It works when there is only one field in the variable :

- vSelection='customer'

- set analysis = {<$(vSelection)=>}

(the selection in customer is removed)

I have lots of selections to remove for some measure, and I would like to use a variable, in order to more rapidly and easily adjust the list of selections to remove.

How can I do this please?

Thanks!

1 Solution

Accepted Solutions
yddona_lyn
New Contributor III

Re: Remove selections in a set analysis using a variable

Have you tried removing the ' '.

variable:

vSelection = customer=,offer=,country=,city=

set analysis

{<$(vSelection)>}

4 Replies
MVP
MVP

Re: Remove selections in a set analysis using a variable

seems to work for me.

Could you post a small sample QVW that demonstrates your issue?

yddona_lyn
New Contributor III

Re: Remove selections in a set analysis using a variable

Have you tried removing the ' '.

variable:

vSelection = customer=,offer=,country=,city=

set analysis

{<$(vSelection)>}

Re: Remove selections in a set analysis using a variable

How are you defining the variable

Seems working for me, Here you are ignoring the Customer

Capture.PNG

Variable define

Capture.PNG

Output seems this?

Capture.PNG

jleberre
New Contributor

Re: Remove selections in a set analysis using a variable

It works without the ' ' in the variable

thanks!