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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set a set of values into variable?

Hi all,

I open setting menu>variable overview, I would like to set a set of values into one variable.

For example:

VarTest: 1,2,3

How can I get it?

Thanks.

6 Replies
syed_muzammil
Partner - Creator II
Partner - Creator II

Hi,

If the Values are being taken from a field then you can use Concat function of Qlikview .

Not applicable
Author

Thanks for your answer, I would like to set some static values for it. How can I achieve it?

Miguel_Angel_Baeyens

Hi Isaac,

If the values you want to set are numeric, you can set them in the Variable Overview as you already did. If they are strings, you have to quote them

'A','B','C'


Then you can retrieve them in your charts using Pick()

Pick(1, $(variableName))


will return "A".

Bear in mind that there are not "arrays" as such in QlikView.

Hope this helps.

Not applicable
Author

Hi,

But when I set it as 'A','B','C' in Variable Overview , there is an error message alerts: garbage after "," .

Miguel_Angel_Baeyens

Values will be stored anyway. I presume that it's something related to the editor, since you can store anything in a variable.

Regards.

marcohadiyanto
Partner - Specialist
Partner - Specialist

hi,

go to document properties->Variables->new->Variable Name

and then set the value, if you want static then select 'Read-only'