Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ALL,
i'm trying to maintain a file for variable in Qliksense , but when i run this script .
i get this error
Temp_Variables:
LOAD Name,
Expression,
Comment
FROM [lib/expressions1.xlsx]
(ooxml, embedded labels, table is Sheet2);
// Create variables
for i = 0 to NoOfRows('Temp_Variables') - 1
let vName = peek('Name', i, 'Temp_Variables'); // Name of the variable
let vComment = peek('Comment', i, 'Temp_Variables'); // Comment/description of the variable
let $(vName) = peek('Expression', i, 'Temp_Variables') & chr(10) & '/* $(vComment) */'; // Expression
next i
// Remove temp variables
let i = null();
let vName = null();
let vComment = null();
// Remove temp tables
drop table Temp_Variables;
any idea please
TIA
Seems to me like your list of names has a value with a space in it, which would break the LET statement.
EDIT: The value being 'vFormConversion Rate', if that wasn't clear.
Thanks ..
You generally shouldn't have spaces in your variable names, but you can tolerate it by adding brackets around the variable name in the script:
let [$(vName)] = peek('Expression', i, 'Temp_Variables') & chr(10) & '/* $(vComment) */'; // Expression
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com