Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
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

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.

Alessandro

3 Replies
MVP
MVP

Re: Numbering Year Months progressively

Try like:

Load

          YearMonth,

          AutoNumber(YearMonth) as Sequence

zhadrakas
Valued Contributor

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

;

rahulpawarb
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.

Regards!

Rahul Pawar

Community Browser