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

Store QVD using fields from Table

Hi,

I have attached a QlikView Document which looks at a Excel spreadsheet (also attached), when creating the QVD I want to use the distinct values from Fin Year and Fin Period and use these  as part of the QVD name.

So for example I would like the QVD Name to be:

Fact_2017_10.qvd

STORE Fact into 'C:\Temp\Fact' &'_'&[Fin Year]&'_'&[Fin Period]'&.qvd (QVD);

Thanks

1 Solution

Accepted Solutions
its_anandrjs

Load another table with Distinct values and load fin year and fin month rows in a variable and then add to store command.

DateFields:

LOAD Distinct [Fin Year] as Fin_Year,[Fin Period] as Fin_Period Resident Fact;

LET vFinYear = Peek('Fin_Year',0,'DateFields');

LET vFinMonth = Peek('Fin_Period',0,'DateFields');

STORE Fact into Fin_$(vFinYear)_$(vFinMonth).qvd (QVD);

DROP Table Fact;

View solution in original post

3 Replies
its_anandrjs

Load another table with Distinct values and load fin year and fin month rows in a variable and then add to store command.

DateFields:

LOAD Distinct [Fin Year] as Fin_Year,[Fin Period] as Fin_Period Resident Fact;

LET vFinYear = Peek('Fin_Year',0,'DateFields');

LET vFinMonth = Peek('Fin_Period',0,'DateFields');

STORE Fact into Fin_$(vFinYear)_$(vFinMonth).qvd (QVD);

DROP Table Fact;

swuehl
MVP
MVP

Maybe something like

LET vFile = 'C:\Temp\Fact_'& FieldValue('Fin Year',1) &'_'& FieldValue('Fin Period',1)& '.qvd';

STORE Fact into [$(vFile)] (QVD);

ivandrago
Creator II
Creator II
Author

Thanks!