Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

d_koti24
Not applicable

Regarding select dynamically previous qvd.

Hi,

I Have One Qvd ,called Year_qvd ,that qvd contains the yearly wise data.i was splitted that qvd into monthly wise qvd's (MAR,APR,MAY ..upto this month ,remaining data will come in future.)

in script level ,i want to load the previous month qvd data dynamically.

ex:

previous month:

Load *

from may.qvd                              ------> here i want to change may.qvd to june.qvd dynamically in script.

if july month will come,automatically june qvd gets created.

now i want to load june qvd data dynamically instead of may.

How to achive this dynamically.

Regrds,

kd

1 Reply
Not applicable

Re: Regarding select dynamically previous qvd.

Try like below:

Let vPrevMonthNameQVD = Month(Addmonths(Today(),-1)) & '.qvd' ;

LOAD * FROm [$(vPrevMonthNameQVD).qvd] (qvd) ;