Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one explain me regarding different ways to declare a variable with an example...how to create
Thanks & regards,
Reddi Kishor
this one as well
Hi kishor,
Following are the ways you can declare variables
1. Using Settings >> Variables Overview >>Add
Assign a value to the variable
2. Use keywords LET and SET in the coding window
Examples
Let C= 1+2
Treat as string
SET C = 1+2
Evaluate after = sign(numeric)
I hope this helps.
Regards,
KC
Dear Reddi,
Listed below are the ways through which you can create variables,
1. Using LET
2. Using SET
3. Through Variable Overview
4. Loading variables and values using For Loop in edit script such as given below,
tmp:
LOAD
VariableName,
VariableValue
FROM
sales.xls;
Let vNoRows = noofrows('tmp');
For I = 0 to $(vNoRows) - 1
Let vVarName = peek('VariableName', $(I), 'tmp');
Let vVarValu = peek('VariableValue', $(I), 'tmp');
Set $(vVarName) = "$(vVarValu)";
Next
Kind regards,
Ishfaque Ahmed
This blog link is also helpful to understand basics and usage scenarios:
http://www.analyticsvidhya.com/blog/2015/06/variables-qlikview-data-stories/
Kind Regards,
Rahul Thakkar