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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating variable in script - problem with the $()

Hello All,

I would like to ask you to help me with the fallowing issue.

I have an excel file that contains following data:

VAR_NAME VAR_DEF

VAR_1 PRODUCT = {"SOMETHING"}

VAR_1_SUM SUM{<$(VAR_1)>} Amount)

When I create a variable in the script the result is like this:

VAR_1: PRODUCT = {"SOMETHING"}

VAR_1_SUM: SUM{<PRODUCT = {"SOMETHING"}>} Amount)

Do you know any method to force QlikView to stop evaluating the $() part during the variable creation?
Thanks in advance for your help.

Best regards,

JTPro

2 Replies
Anonymous
Not applicable
Author

Hi JTPro,

not sure if I'm missing anything here but shouldn't you be able to just define the variables like strings:

Let

Var1= 'PRODUCT = {"SOMETHING"}';

Let Var2 = 'SUM{<$(Var1)>} Amount)';

This gives me two variables in the document:

Var1 - PRODUCT = {"SOMETHING"}

Var2 - SUM{<PRODUCT = {"SOMETHING"}>} Amount)

Not applicable
Author

Hi,

Thank you for quick reply.

The point is that in the case of Var2 instead of:

SUM({<PRODUCT = {"SOMETHING"}>} Amount)

I want to have:

SUM({<$(Var1)>} Amount)

QlikView is evaluating the $(Var1) and replace it with the PRODUCT = {"SOMETHING"} that is what I want to disable.

Kind regards,

JTPro