Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mendoncart
Contributor III
Contributor III

Autogenerate

Hey guys.

I'm having some trouble with this function.

The thing is that i have a budget table that the records are made by start and end date.

So, it's like this:

     Product      Start Date     End Date     Value

     Product A     201301          201307     1000

and i would like to make a table like this:

     Product         Date        Value

     Product A     201301      1000

     Product A     201302      1000

     Product A     201303      1000

     Product A     201304      1000

     Product A     201305      1000

     Product A     201306      1000

     Product A     201307      1000

I know that autogenerate probably will do the trick but i just don't know how to do it.

So, can anyone help me out?

PS: Did i posted in the right place?

Thanks

1 Solution

Accepted Solutions
Anonymous
Not applicable

Looping works. Something like this:

LOAD

Product,

Value,

StartDate + iterno() - 1 as Date

Resident Temp

while StartDate + iterno() - 1 <= EndDate ;

View solution in original post

4 Replies
Anonymous
Not applicable

Looping works. Something like this:

LOAD

Product,

Value,

StartDate + iterno() - 1 as Date

Resident Temp

while StartDate + iterno() - 1 <= EndDate ;

Not applicable

Try like below:

LOAD Product ,

        Value,

        [Start Date] + IterNo() -1 AS Date

FROM SOURCETABLE

While [Start Date] + IterNo() -1 <= [End Date];

Please find the attached qvw as reference.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

TABLE:

LOAD Product ,

  Value,

  Date(MonthStart(StartDate, IterNo() -1), 'YYYYMM') AS Date

While Date(MonthStart(StartDate, IterNo() -1), 'YYYYMM') <= EndDate;

LOAD Product,

Date(Date#([Start Date], 'YYYYMM')) AS StartDate,

Date(Date#([End Date], 'YYYYMM')) AS EndDate,

Value

Inline [

Product,  Start Date,     End Date,    Value

Product A , 201301, 201307,     1000];

Regards,

Jagan.