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

Difference between using Variables in the Loadscript Sencse vs. View

In the good old times, i used the following part of a Script to load dynamic columns from a table with QlikView.

Table1:

 

Table1:
LOAD 
   %ArtikelNr_PK,
   $(VAR_DATE_Year_Current)		as AY,		
FROM c:\Example\test.qvd (qvd);

 

and it works perfekt. 

Result:

 %ArtikelNr_PKAY
A10
B15
C30
.. 

 

Now if I use the same Script in QlikSence. I get now a wrong result. Now i have always the value of the variable in each cell.

Result:

 %ArtikelNr_PKAY
A2020
B2020
C2020
.. 

 

I have no Idea whats wrong ?

sincerly Martin

 

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

You mean your variable won't be interpreted as field else it just takes it as field-value? You could try to add brackets like:

[$(VAR_DATE_Year_Current)] as AY

- Marcus

View solution in original post

3 Replies
martinpohl
Partner - Master
Partner - Master

for me it look ok.

You have one variable so you have one value in all data lines.

How are the values 10, 15, 30 a.s.o in QlikView script calculated?

What is the value or expression in variable?

Regards

Martin

marcus_sommer

You mean your variable won't be interpreted as field else it just takes it as field-value? You could try to add brackets like:

[$(VAR_DATE_Year_Current)] as AY

- Marcus

MartinGer
Contributor II
Contributor II
Author

Thanks Marcus,

thats what I want to know. For me thats new. But it works !

sinceryl Martin