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

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
tresesco
MVP
MVP

Try like:

Load

          YearMonth,

          AutoNumber(YearMonth) as Sequence

zhadrakas
Specialist II
Specialist II

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
Specialist III
Specialist III

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