Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Gopi_E
Creator II
Creator II

Using Autonumber to generate sequence numbers for two different months

Hi Qliker's,

I hope everyone doing good,

I am facing issue with Autonumber, It's not giving sequence Number, 

I want to create Sequence Numbers for two different Months, below one is my code 

StartDateMonthNo:
Load StartDateMonth/Year
AutoNumber(StartDateMonth/Year) as StartDateMonthNo
Resident SalesData Order By StartDate Desc;

EndDateMonthNumber:
Load EndDateMonth/Year,
AutoNumber(EndDateMonth/Year) as EndDateMonthNo
Resident HSMS_UK_SERVICE Order By EndDate Desc;

Here i have two different Months(StartDateMonth/Year and EndDateMonth/Year) which is there in SalesData Table,

i need sequence numbers for above two months, but the bove code giving below result.

Gopi_E_0-1603966655829.png

In Above fields, EndDateMonth/Year having sequence number from 2 to 13 and  those numbers are not associate correctly with Month fields, 

I need sequence numbers 1 to 12 for each months separately line first Table(StartDateMonth/Year)

Please give any idea for getting sequence numbers, 

Thanks In Advance @sunny_talwar  and All

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

@Gopi_E  try below

StartDateMonthNo:
Load StartDateMonth/Year
AutoNumber(StartDateMonth/Year,'Start') as StartDateMonthNo
Resident SalesData Order By StartDate Desc;

EndDateMonthNumber:
Load EndDateMonth/Year,
AutoNumber(EndDateMonth/Year,'End') as EndDateMonthNo
Resident HSMS_UK_SERVICE Order By EndDate Desc;

View solution in original post

2 Replies
Kushal_Chawda

@Gopi_E  try below

StartDateMonthNo:
Load StartDateMonth/Year
AutoNumber(StartDateMonth/Year,'Start') as StartDateMonthNo
Resident SalesData Order By StartDate Desc;

EndDateMonthNumber:
Load EndDateMonth/Year,
AutoNumber(EndDateMonth/Year,'End') as EndDateMonthNo
Resident HSMS_UK_SERVICE Order By EndDate Desc;

Gopi_E
Creator II
Creator II
Author

Thank you Kush