Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

for...next with exclude

Hi! Loading from a webpage and encountered an issue. I can't exclude certain values in my for...next loop.

for vWeek= 1 to 52

LOAD col1,
  col2
FROM
[http://yourdomain.com/history/weeks.asp?qsWeek=$(vWeek]
(html, codepage is 1252, embedded labels, table is @2);

next


I would like to exclude week 23, 25, 26, 27, 28 and week 29. regards thomas

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

You can do that using a conditional within the loop (among some others)

FOR vWeek = 1 to 52


  IF Match($(vWeek), 23, 25, 26, 27, 28, 29) = 0 THEN

    LOAD col1,
         col2
    FROM
    [http://yourdomain.com/history/weeks.asp?qsWeek=$(vWeek)]
    (html, codepage is 1252, embedded labels, table is @2);

 

  END IF

NEXT

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

1 Reply
Miguel_Angel_Baeyens

Hi,

You can do that using a conditional within the loop (among some others)

FOR vWeek = 1 to 52


  IF Match($(vWeek), 23, 25, 26, 27, 28, 29) = 0 THEN

    LOAD col1,
         col2
    FROM
    [http://yourdomain.com/history/weeks.asp?qsWeek=$(vWeek)]
    (html, codepage is 1252, embedded labels, table is @2);

 

  END IF

NEXT

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica