Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Do you know how to set variables in Edit expression?

Do you know how to set variables in Edit expression?

I want to set several variables and put them into one string as a measure value.

Could you help me?

6 Replies
satheshreddy
Contributor III

Re: Do you know how to set variables in Edit expression?

Hi Swana,

can you elaborate and post sample expectation.

Regards

sathish

ogster1974
Honored Contributor II

Re: Do you know how to set variables in Edit expression?

Need more information to help you.

vinieme12
Esteemed Contributor II

Re: Do you know how to set variables in Edit expression?

You create variables by going to Settings >> Variable Overview >> Add

Are you referring to Edit Expression of the Variable Overview, when creating the variable?

if you want a string of all variable values then create another variable as below

vVariableString = $(vVariable1) &','& $(vVariable2) &','& $(vVariable3)......and so on

Can you post some snapshots of what you are looking to achieve for more clarity?

Not applicable

Re: Do you know how to set variables in Edit expression?

edit expression.PNG

want to set variables in here..

ogster1974
Honored Contributor II

Re: Do you know how to set variables in Edit expression?

You can use a variable in there =$(yourvariable) but not SET one.

You can set Variables on load of your App in the load script or in the Variables section in the bottom left hand corner of your screen

You can also use an extension like QSVariable to let the user change the value.

Regards

Andy

Not applicable

Re: Do you know how to set variables in Edit expression?

thanks! it can create a static variable, but if i try something dynamic(?) it just show text itself.

I made a variable for minimum price within a year with selection applied(with dollor sign $)

min({$<Day = {">=$(=Date(Max(Day)-364))"}>} Price)

but when I use the variable inside 'Edit Expression' it just show text 'min({$<Day = {">=$(=Date(Max(Day)-364))"}>} Price)'