Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
olguita2014
Creator
Creator

Qlik Sense: Store a QVD with a Variable Name

Hi Everyone


In my script I want to store the filename as every day, for example:


store * from Precio_Crudo_GasNatural_OPEP into 'lib://QVDs/Precio_Crudo_GasNatural_OPEP_$(vFecha).qvd'(qvd);

but the result is :  Precio_Crudo_GasNatural_OPEP_=Now().qvd

and I want to store like that:

Precio_Crudo_GasNatural_OPEP_27/09/2016.qvd

Precio_Crudo_GasNatural_OPEP_28/09/2016.qvd

Precio_Crudo_GasNatural_OPEP_29/09/2016.qvd

etc

I create a variable vFecha=Now()  but how do I use that as part of the filename?


Thanks.



1 Solution

Accepted Solutions
marcus_sommer

Try this:

let vFecha = date(today(), 'DD.MM.YYYY'); // a slash isn't an allowed char within a filename

- Marcus

View solution in original post

3 Replies
marcus_sommer

Try this:

let vFecha = date(today(), 'DD.MM.YYYY'); // a slash isn't an allowed char within a filename

- Marcus

rohitk1609
Master
Master

Hi Olga,

Run the below script you will have your best solution:

=> create a new folder connection with name test

.

Let vtoday = date(today());

Names:

LOAD * inline [

"First name"|"Last name"|Amount|"Has cellphone"

John|Anderson|100|Yes

Sue|Brown|80|Yes

Mark|Carr|60 |No

Peter|Devonshire|40|No

Jane|Elliot|20|Yes

Peter|Franc|10|Yes ] (delimiter is '|');

store Names into "lib://test/$(vtoday).qvd"(QVD);

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Rohit Kumar

rohitk1609
Master
Master

Hi olga,

Please replace only test with your connection name and run the script

Let vtoday = date(today());

Names:

LOAD * inline [

"First name"|"Last name"|Amount|"Has cellphone"

John|Anderson|100|Yes

Sue|Brown|80|Yes

Mark|Carr|60 |No

Peter|Devonshire|40|No

Jane|Elliot|20|Yes

Peter|Franc|10|Yes ] (delimiter is '|');

store Names into "lib://test/$(vtoday).qvd"(QVD);