Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
dbouilleux1
Partner - Contributor
Partner - 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

Labels (1)
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens
Support
Support

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

View solution in original post

4 Replies
Miguel_Angel_Baeyens
Support
Support

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
Partner - Specialist
Partner - Specialist

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.

dbouilleux1
Partner - Contributor
Partner - Contributor
Author

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

Thank you very much.
Denis

Miguel_Angel_Baeyens
Support
Support

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