Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
shruthibk
Creator
Creator

how to load multiple qvds

hi all how do i load multiple qvds,

i have qvds's like

1)icaps_2015_12_31.qvd

2)icaps_2016_01_29.qvd  (week day qvd)

3)icaps_2016_02_29.qvd  (week day qvd)

4)icaps_2016_03_23.qvd

5)icaps_2016_03_24.qvd

6)icaps_2016_03_25.qvd

7)icaps_2016_03_26.qvd

8)icaps_2016_03_27.qvd


where i have to load latest 5 days qvd and last 2 month qvd and have to make as one qvd

and last year qvd and last 2 months qvd have to make as one qvd

i am able to achieve loading of latest 5 days qvds,

last 2 months qvds i am not able to load as it is month end data but it is weekday not weekend data


please help me to achieve this


thanks,

shruthi

1 Solution

Accepted Solutions
maxgro
MVP
MVP

you can use a loop

// last 5 days, including today

FOR i=0 to 4

  LET v5d = 'icaps_' & date(today(1)-$(i), 'YYYY_MM_DD') & '.qvd';

  Table:

  LOAD *

  FROM [$(v5d)] (qvd);

NEXT;

// last 2 months

FOR i=0 to 1

  LET v5d = 'icaps_' & date(addmonths(today(1),-$(i)), 'YYYY_MM_??') & '.qvd';

  Table:

  LOAD *

  FROM [$(v5d)] (qvd);

NEXT;

View solution in original post

2 Replies
Chanty4u
MVP
MVP

maxgro
MVP
MVP

you can use a loop

// last 5 days, including today

FOR i=0 to 4

  LET v5d = 'icaps_' & date(today(1)-$(i), 'YYYY_MM_DD') & '.qvd';

  Table:

  LOAD *

  FROM [$(v5d)] (qvd);

NEXT;

// last 2 months

FOR i=0 to 1

  LET v5d = 'icaps_' & date(addmonths(today(1),-$(i)), 'YYYY_MM_??') & '.qvd';

  Table:

  LOAD *

  FROM [$(v5d)] (qvd);

NEXT;