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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
LearnFreak
Contributor III
Contributor III

1 variable with 2 values

Hi,

I need to put 2 different values for 1 variable in the LoadScript of a report.

I am using the syntax with let - 

LET Customer_name  ='XXXX';

LET Customer_name  ='YYYY';

But when I load data, I have data only for one customer but not the second one as well.

Labels (3)
4 Replies
sidhiq91
Specialist II
Specialist II

@LearnFreak Why under one same name? cant we use 2 different variables? And how are you planning to use them in the script?

LearnFreak
Contributor III
Contributor III
Author

I want to load data only for those 2 customers....

sidhiq91
Specialist II
Specialist II

@LearnFreak then in that case you can use inline load, something like below:

Table1:

Load * Inline [

Customer_name 

XXXX

YYYY

];

LearnFreak
Contributor III
Contributor III
Author

I tried another way and it worked...

I created 2 variables variable 1 and variable 2 and in the Load statement I used OR for both variables and it loaded data perfectly well 🙂