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

Inteno() function.

[ExpenseEnd Date] >  MonthStart(addmonths(ExpenseStartDate, ExpenseFrequencyNum*(iterno()-1)));

Trying to understand the above script.What exactly it is doing ?

ExpenseEnd Date = 12/31/2020

ExpenseStartDate = 1/1/2016

ExpenseFrequencyNum = 1


Thank you.

3 Replies
sunny_talwar

It seems like you are adding the missing Month between 12/31/2020 and 1/1/2016.

So starting with 1/1/2016, every While loop will add a month to it until it reaches 12/31/2020

First While Loop -> 1/1/2016

Second While Loop -> 2/1/2016

Third While Loop -> 3/1/2016

.

.

.

and so on.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Iterno() returns the current cycle count value in a LOAD... WHILE...; statement.

If the expression you posted is part of the WHILE condition, then the LOAD will generate rows for 1/1/2016, 2/1/2016, up to 12/1/2020. With the current lack of context details, that's about as much explanation I can give you.

Best,

Peter

hic
Former Employee
Former Employee

An example of how to use While and IterNo() can be found on Creating Reference Dates for Intervals.

HIC