Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Numbering Year Months progressively

Hi to all,

I've to assign a progressive number to Year Months in the script using Qlik Sense.

For example:

2017/07     1

2017/08     2

2017/09     3

2017/10     4

2017/11     5

2017/12     6

2018/01     7

2018/02     8

2018/03     9

And so on...  Which is the best way to do this?

Thank you for anyone helps me.


3 Replies

Re: Numbering Year Months progressively

Try like:



          AutoNumber(YearMonth) as Sequence

Valued Contributor II

Re: Numbering Year Months progressively

What about

autonumber(YearMonth) as Number

maybe you Need to sort your table before.

You could do this with presceding load

Load *,

         autonumber(YearMonth) as Number


Load *

From ABC

order by MonthYear ASC


Valued Contributor III

Re: Numbering Year Months progressively

I agree with Tim! If YearMonth values are not in order then use of Only AutoNumber will not work; we need to couple it with Order By clause to get desired results.


Rahul Pawar