Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

add a column equal to variable?

Hi - is it possible to add a column to my script load equal to a variable I already set? I set vEndDate equal to the date I will be using to run the script and would like to join a Date column to the final table where Date is equal to vEndDate. I can then store the table down as part of a new QVD and know which date each set of data it is from after it concatenates. Date is not a part of any of my load files so I was hoping to create it in the script and join it to my final table. Any suggestions?

2 Replies
ramoncova06
Specialist III
Specialist III

you can add the values from variables into your tables

here is an example

load

field1,

field2,

'$(vEndDate)' as vEndDate

source

sunny_talwar

Yes you can. Try this script:

LET vNow = Chr(39) & Today() & Chr(39);

Table:

LOAD Date($(vNow)) as Date

AutoGenerate 1;