Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Increment by period

Hi community,

Is there anyway in the script to increment a value by month and year?  The first year is 2012 period 0.  I want 2012, period 1 to be 1 and 2012, period 2 to be 2 etc. and 2013, period 1 to be 13 and 2013 period 2 to be 14.

1 Reply

Increment by period


     Try using autonumber function as


          autonumber(YearField & PeriodField) as PeriodNumber

     From datasource;

Note: table should be order based on datefield.

Community Browser