Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Month Year to Month Number

Hi,

I'm wondering if you can change month year to month numbers for consecutive years. I want the month numbers for the last 3 years with  January 2015 starting as '1'. Is it possible to go past 12 months in Qlikview?

For example,

month_yearmonth_number
Jan-20151
Feb-20152
Mar-20153
Apr-20154
...
Jan-201725
Feb-201726

Thanks!

1 Solution

Accepted Solutions
sunny_talwar

Another option is to just use AutoNumber(month_year) as month_number in your mast calendar table where the table is sorted by date or month_year in ascending order

View solution in original post

4 Replies
stigchel
Partner - Master
Partner - Master

Sure why not, but instead of using date functions create a dual yourself. So in the 'normal' calendar create script where you iterate between a min and max date load a field like

Dual(Date(TempDate,'MMM-YYYY',Rowno()) as MonthYear

sunny_talwar

Another option is to just use AutoNumber(month_year) as month_number in your mast calendar table where the table is sorted by date or month_year in ascending order

stigchel
Partner - Master
Partner - Master

For master calendar scripts see for example

Better Calendar Scripts | Qlikview Cookbook

Anonymous
Not applicable
Author

Thank you Sunny! Worked perfectly.