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

Use while and where in loading script

I have the follwing script

AsOfMonth:

load 'Current' as Type,

Month as Month_AsOf,

Month as Month

Resident SalesData;

Concatenate (AsOfMonth)

load 'Rolling 3' as Type,

Month as Month_AsOf,

Month + 1 - IterNo() as Month

Resident SalesData

where promo =1

while IterNo() <= 3//here my problem

;

How to correct it ?

1 Solution

Accepted Solutions
avinashelite

try like this

while (IterNo() <= 3 and promo =1) ;

View solution in original post

2 Replies
avinashelite

try like this

while (IterNo() <= 3 and promo =1) ;

swuehl
MVP
MVP

I think you can either use a WHERE or a WHILE clause in the same LOAD statement.

If you want to use both clauses, you would need separate / preceding LOAD statements.