# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
Not applicable

## Numbering Months

Hi,

I am trying to create a table in Qlikview where I need number months starting Jan 2011 until August 2012.

Example:

Jan 2011 = month 1 and Aug 2012 = month 19. I have tried using the built num(month(field)) function and that only returns the months 1-12. Please let me know if anyone has a solution to this simple question.

Thank you,

Saurav

Tags (2)
1 Solution

Accepted Solutions
Contributor III

## Re: Numbering Months

If the table gets loaded in order (or do an ORDER BY (Date) in your load, then create a field AUTONUMBER(Month,Year) AS MonthYearNumber to get an integer for each month and year combination.

2 Replies
Contributor III

## Re: Numbering Months

If the table gets loaded in order (or do an ORDER BY (Date) in your load, then create a field AUTONUMBER(Month,Year) AS MonthYearNumber to get an integer for each month and year combination.

Honored Contributor II

## Re: Numbering Months

=(year(Date) - year(StartDate))*12 + month(Date) - Month(StartDate) + 1

StartDate - Jan 2011 (or you can use min() function)