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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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

Labels (1)
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;