Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
pauldamen
Partner
Partner

For to loop not working

All,

I am trying to create a for loop which partially looks like this:

let vAantal1 = sum(num(Aantal));

LIB CONNECT TO xxxxx;

set Counter =  0;

for Counter = 0 to $(vAantal)

The field Aantal is coming from a previous loaded table and contains the total number of records in the table. The second loop should load all the details in a loop which runs from 0 to the total number of records. But it keeps giving me the following error:

The following error occured:

for Counter = 0 to >>>>>><<<<<<

Any thoughts?

Regards, Paul

1 Reply
sunny_talwar

I think this is the part which is a problem

Capture.PNG

You can't really use Sum/Min/Max in your variable directly... may be you can do like this

Sum:

LOAD Sum(Aantal) as SumAantal

Resident ....;

LET vAantal1 = Peek('SumAantal');