Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.


Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Set a field as a variable??

In my current model im trying to set a variable to read data from a column in an excel sheet. Im trying to set the field name as the variable so that if the data changes, it wont affect the variable being read by a where condition. It saves me having to hard code data.

i tried "let vCost=COST(which is the field name) but it doesnt seem to work in practice.

any advice?

2 Replies

Re: Set a field as a variable??


     Try this,

     Set vCost = Cost;


The Set command assigns the variable the text to the right of the equal sign, whereas the Let command evaluates the expression. 

Hope it helps

Not applicable

Re: Set a field as a variable??


The field "COST" contains a thousand rows of data. So I would like to create a variable to account for all the data. If that makes sense.