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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

AutoGenerate & Iterno()

Hi Experts,

What is the main Difference between "AutoGenerate & Iterno()"  ?

Regards,

Mahesh

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Autogenerate is used for automatically generating data in qv.

IterNo( ) returns an integer indicating for which time one single record is evaluated in a load statement with a while clause. The first iteration has number 1.

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Autogenerate is used for automatically generating data in qv.

IterNo( ) returns an integer indicating for which time one single record is evaluated in a load statement with a while clause. The first iteration has number 1.

qlikview979
Specialist
Specialist
Author

Hi  Bro,

Thanks for your support

Regards,

Mahesh

MK_QSL
MVP
MVP

Use below script in your qvw.

Let vMinDate = Num(Date(YearStart(Today())));

Let vMaxDate = Num(Date(Today()));

Calendar:

Load

  RowNo() as RowNumber,

  IterNo() as IterNumber,

  Date($(vMinDate) + IterNo() - 1) as Date

AutoGenerate 1

While $(vMinDate) + IterNo() - 1 <= $(vMaxDate);

Now use the same and change AutoGenerate 2

Try to analyze difference between output of those two.

marcus_sommer

Autogenerate will repeat a load-statement x-times (defined manually or per expression) and each time in the same way - you could only functions like recno/rowno to adjust anything.

By using from iterno() in combination with a while-statement you could repeat the load from the various records x-times depending on your conditions.

- Marcus

qlikview979
Specialist
Specialist
Author

Hi Bro's

Thanks.