Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

What is IterNo() function and when would you use it in real life scenarios?

Hi all,

What is IterNo() function and when would you use it in real life scenarios?

I have seen it being used but always wondered what it does. How is it different to RowNo() or something like that?

3 Replies
maheshkuttappa
Creator II
Creator II

Check this link

IterNo(),RecNo(),RowNo()

sunny_talwar

This thread provides one example:

Loops in the Script

Capture.PNG

Siva_Sankar
Master II
Master II

John,

Iterno() only makes sense if used together with while. You can autogenerate rows, for example for creating a calendar, or creating records from another table. A real example would be having a table with mortgages contracts containing only the initial payment. With iterno() / while and some business rules you can generate the complete amortization tables,

an easy example would be:

Example:

Load iterno() as Counter

AutoGenerate 1

While iterno() < 10;

Rowno:

RowNo( )

Returns an integer for the position of the current row in the resulting QlikView internal table. In contrast toRecNo( ), which counts the records in the raw data table, the RowNo( ) function does not count records that are excluded by where clauses and is not reset when a raw data table is Concatenation to another. The first row is number 1.

Examples:

Raw data tables:

Tab1.csv

A

B

1

aa

2

cc

3

ee

Tab2.csv

A

B

5

xx

4

yy

6

zz

QVTab:

Load *, RecNo( ), RowNo( ) from Tab1.csv where A<>2;

Load *, RecNo( ), RowNo( ) from Tab2.csv where A<>5;

The resulting QlikView internal table:

QVTab

A

B

RecNo( )

RowNo( )

1

aa

1

1

3

ee

3

2

4

yy

2

3

6

zz

3

4

Hope it clarifies your doubt.

-Siva