Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

variables

I have used a calculated variable as below and i have stored this along with rest of the data load into a qvd

 

SET vtest2 = Sum(AGGR(IF(Date(Monthstart,'DD/MM/YYYY') <= Date(Today(),'DD/MM/YYYY'),[sales]),[region]));

 

Now i would like to refer this variable again in another load script.. to use the result of above variable.

 

is this possible?

 

 

Labels (1)
10 Replies
Kushal_Chawda

@raadwiptec  do you want to refer in another load script of the another app?

raadwiptec
Creator II
Creator II
Author

@Kushal_Chawda  in the Load script.. 

Kushal_Chawda

@raadwiptec  in  load script of same app or another app?

raadwiptec
Creator II
Creator II
Author

@Kushal_Chawda  -- in the same app.. so i make a qvd out of first load script..then use that qvd as a fresh load 

raadwiptec
Creator II
Creator II
Author

@Kushal_Chawda  -- in the same app.. so i make a qvd out of first load script..then use that qvd as a fresh load 

Usama
Creator
Creator

Yes, you can do in this way

 

From Nothing - To Something - To Everything
raadwiptec
Creator II
Creator II
Author

 

can you share the piece of code that we could reuse from the variable created.. For ex: here

SET vtest2 = Sum(AGGR(IF(Date(Monthstart,'DD/MM/YYYY') <= Date(Today(),'DD/MM/YYYY'),[sales]),[region]));

Kushal_Chawda

@raadwiptec  Not sure I am following that but as you already created a variable with code then you can call that variable in some other part of the code as purpose of the variable itself is to reuse the code.

raadwiptec
Creator II
Creator II
Author

Iam able to reuse all the ones with LET Prefix, But SET Prefix iam getting some token error.