Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
MartinGer
Contributor II
Contributor II

Load a column whose name was defined via a variable in the Loadscript

Dear community,

currently i'm working on an applikation where i should show some numbers from the last week. Therefor i get a table with the values per week from our finance team. in this tabel every week is a own columen.

The file contains a lot of data, but I only need one column, always the previous week.

So the idea was to define this colume as a varible and use this variable in the Load script. But whit my script it doesn’t work.

.-------

sub Ex

set PreviousWeek = '2020/24';

// -- Previous Week --

C_W: // Costumers per Week
LOAD
'$(PreviousWeek)' as ValuesPreviousWeek
FROM [\\s-at00-120\DataWarehouseLN\Common\107_Load\Verkaufszahlen\Käufer_Woche.qvd] (qvd);


end sub

.----

 

sincerly Martin 

Labels (1)
1 Solution

Accepted Solutions
vanessa_loschi
Contributor II
Contributor II

Hello,

Try it without single quotes.

LOAD
$(PreviousWeek) as ValuesPreviousWeek
FROM [\\s-at00-120\DataWarehouseLN\Common\107_Load\Verkaufszahlen\Käufer_Woche.qvd] (qvd);

Regards.

 

View solution in original post

2 Replies
vanessa_loschi
Contributor II
Contributor II

Hello,

Try it without single quotes.

LOAD
$(PreviousWeek) as ValuesPreviousWeek
FROM [\\s-at00-120\DataWarehouseLN\Common\107_Load\Verkaufszahlen\Käufer_Woche.qvd] (qvd);

Regards.

 

MartinGer
Contributor II
Contributor II
Author

Thanks  Vanessa,

you would astonish how mutch Trials i had done on this Topic without success.

The more grateful I am for your tip.

sincerly Martin