Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

dbouilleux
New Contributor

Set Analysis using variable value

Hello,
Certainly, the overall analysis will drive me mad ...

I want to enter variable values ​​from a predefined list calculated with all data (regardless of current selections so).
There are two values ​​to enter, the second is constrained by the value of the first.
No problem for the first, but I can not be predefined list to reflect the value of the first ...

The attached document is used to display what I want to do ('Collectivé' is the first values ​​to enter, 'Budget' is the second to capture one of the budgets associated with the 'Collectivé' entry).

I manage to get the right list of 'Budget' with an expression in which the value of 'Collectivé' is provided explicitly, but I can not get the right result by using a variable to provide this value ... (see the expression of the Text object).

If anyone sees what's wrong, I'm interested ...

Denis

1 Solution

Accepted Solutions
MVP
MVP

Re: Set Analysis using variable value

Hi,

Do you mean this instead of your last expression in the text object?

Concat({1 < Collectivité = {'$(vCollectiviteActualites)'}, Budget = >} DISTINCT Budget, ';')

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

4 Replies
MVP
MVP

Re: Set Analysis using variable value

Hi,

Do you mean this instead of your last expression in the text object?

Concat({1 < Collectivité = {'$(vCollectiviteActualites)'}, Budget = >} DISTINCT Budget, ';')

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

christian77
Valued Contributor

Set Analysis using variable value

If you type 1, instead of $, it won’t filter by other filters. Try to use only Budget =, that way, it won’t have of mind the selections in that field only, but it´ll filter by other fields.

dbouilleux
New Contributor

Set Analysis using variable value

It works!
I do not understand why, I will analyze this, but I have the solution.

Thank you very much.
Denis

MVP
MVP

Re: Set Analysis using variable value

Denis,

The reason is that when you use string values in set analysis, they need to be single quoted. The variable returns a string (a literal of characters) and you need to single quote them so the set can work.

Regards,

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

Community Browser