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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
yelin_nyu
Creator
Creator

loop

I was trying to use loop function to lable my files in correct dates.

Ref:

load * INLINE [
    c, Ship_File_Date, Fcst_File_Date
    1, 20130322, 20130118
    2, 20130419, 20130215
    3, 20130524, 20130322
]
;

for i=1 to 1
let vStart=i;
trace >>>$(vStart);
let vShip=if(c='$(vStart)', Ship_File_Date);
trace >>>$(vShip);
next i;

returns me absolutely nothing. what did i do wrong? thanks

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Ref:

load * INLINE [

    c, Ship_File_Date, Fcst_File_Date

    1, 20130322, 20130118

    2, 20130419, 20130215

    3, 20130524, 20130322

];

For i=0 to NoOfRows('Ref')-1

Let vStart =Peek('c',$(i),'Ref');

trace >>> $(vStart);

Let vShip = Peek('Ship_File_Date',$(i),'Ref');

trace >>> $(vShip);

next i;

View solution in original post

3 Replies
Not applicable

Hi there, can you please elaborate a little bit more on what your requirement is?

its_anandrjs
Champion III
Champion III

Hi,

Explain more please what is requirement for loop.

Thanks & Regards

MK_QSL
MVP
MVP

Ref:

load * INLINE [

    c, Ship_File_Date, Fcst_File_Date

    1, 20130322, 20130118

    2, 20130419, 20130215

    3, 20130524, 20130322

];

For i=0 to NoOfRows('Ref')-1

Let vStart =Peek('c',$(i),'Ref');

trace >>> $(vStart);

Let vShip = Peek('Ship_File_Date',$(i),'Ref');

trace >>> $(vShip);

next i;