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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

For - Next Loop

Hallo,

ich habe folgende Schleife

Testtable:

LOAD ApplyMap(......) as Land,

           ApplyMap(...) as Wert

From xyz where ABC = '1';

SET v1 = 'A';

SET v2 = 'B';

für 1 = 1 to 2;

Table:

Noconcatenate LOAD *

Resident Testtable where Land = '$(v$(i))';

let i = i + 1;

Next

dropt table Testtabelle;

Warum wird meine Table nur für die Variable v1 gefüllt?

Vielen Dank

1 Solution

Accepted Solutions
giakoum
Partner - Master II
Partner - Master II

remove i = i+1

next will do that anyway

View solution in original post

5 Replies
giakoum
Partner - Master II
Partner - Master II

remove i = i+1

next will do that anyway

giakoum
Partner - Master II
Partner - Master II

and please correct für 1 = 1 to 2; to for i = 1 to 2

rubenmarin

This will work if you also change:

für 1 = 1 to 2;

to:

for i = 1 to 2 //<-- No semicolon (;) here

giakoum
Partner - Master II
Partner - Master II

true

but I believe this is actually pseudo code, just for demonstration purposes.

rubenmarin

Yep, I don't think QV lets you do "for 1=1 to 2"...already tested, it's undersigned red.

Anyway I can't undertand the final question so I don't really know what's the issue.

Most probably is only the i = i+1 you said.