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: 
adrianavila
Contributor II
Contributor II

Create Multiple QVDs from the YearMonth field

Hello, 

I'm trying to create separate Qvds from the Year/Month field.I'm doing this due to the size of the information to use in qliksense later.

 

OLEDB CONNECT TO xxxxx

SET QVD Directory = '$(QVD path.txt)';

OriginalTable:
SQL SELECTION*
FROM table1 WHERE CAST(dataFont) >= '2023-05-01'; //

**this "dataFont" field is configured to bring year-month-day and time**

Grouped Table:
TO LOAD
*,
Month(Timestamp(dataFont)) AS Month,
Year(timestamp(dataFont)) AS Year
RESIDENTOriginalTable;

FOR Each YearMonth IN FieldValueList('Year' & Month)
LET tablex = 'tabelax_' & YearMonth & '.qvd';
STORE Grouped Table
INTO '$(QVD Directory)$(tabelax)';

NEXT

DISCONNECT;

//DROP TABLEOriginalTable;
//DROP TABLEGroupedTable;

 

 

When generating the qvd, it only brings the accumulated result for the year. I need you to bring the accumulated Years and Months accumulated.

Can anyone help?
Labels (1)
10 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

You can use Where Exist https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFun...

 

like:

 

another_table:

Load

  date

Where exist(dateFont, date)

;

SQL SELECT date From anotherTable;

 

Help users find answers! Don't forget to mark a solution that worked for you!