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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Setting Begin and End Dates in Script

This should be simple but it is the fist time I have had to do this

If I want to have a beginning and ending reporting month variable set at the beginning of my script what is the proper function/syntax

What I want is :

Begin Month Date = 01/01/2012

End Month Date = 06/30/2012

Not sure of the exact syntax or if LET or SET is the proper way to establish.

Thanks in advance,

Steve

12 Replies
kedar_dandekar
Creator
Creator

Hi Zagzebski,


1. Pardon me, but I did not get the Transform load part, can you please elaborate on this (some example would help).

2. As regards to the SET and LET, the main difference is that:

SET assigns the value on the right of the "=" sign as is, without evaluation (string format), and

LET evaluates the expression on the right of the "=" sign before assigning it to the variable.

Simple example would be:

SET vDateExp1 = 3 + 4; //This stores the string '3 + 4' in the variable, whereas

LET vDateExp2 = 3 + 4; //Evaluates the right hand side to 7 and stores this value in the variable

- KD

zagzebski
Creator
Creator
Author

I create a QVD off the file with these date variables. I was just wondering the best way to "move" that variable to the QVD file so I can upload it to a new QVW file.

kedar_dandekar
Creator
Creator

Hi Zagzebski,

Since you are creating a QVD file using these date variables (in the WHERE clause), the data in the QVD would already get filtered by the dates and stored into QVD file, right?

I am sorry, I did not quite get that part - 'Best way to Move the variable to the QVD file'.

Refer attached QVW, in this, I have used the Date variable created using LET assignment, to filter table data (just another way), not sure if this is what you were looking for ..

HTH,

KD