Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Editing Variables on the loading script

Hello,

I was wondering if there is a way to edit the value of the variable on the loading script on qlikview.

for example,

Variable:

temp=1000

Load

     F1,

     $(temp) as F2,

    (Here i would like to do temp = temp + 3 or temp = temp+8 depending on some other fields)

     $(temp) as F3, (in here i would use the new temp value to a new field)

From

...

The thing is i would like the variable to keep his new value for every new row of the table.

Is it possible?

The problem above was to avoid explaining a more real and time consuming issue, but if i found out how to that variable value change on the loading script i would be set.

Thanks alot guys,

KR

1 Reply
swuehl
MVP
MVP

I believe you can't change the variable in the loading script (well, maybe using a Macro...).

But maybe you can do similar using Peek(), something like

Let vVar = 1000;

LOAD Field,

  if(recno()=1, $(vVar), peek(Var2)) as Var,

  if(recno()=1, Rangesum($(vVar),Field), Rangesum(peek(Var2),Field)) as Var2;

LOAD * INLINE [

Field

1

3

5

7

-1

];