Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
zturaiki
Contributor III
Contributor III

autonumber

this is my original data

Original Data

IdDate
A15/12/13 12:00 AM
A15/13/13 12:00 AM
A15/14/13 12:00 AM
A15/15/13 12:00 AM
B25/16/13 12:00 AM
B25/17/13 12:00 AM
C45/18/13 12:00 AM
C45/19/13 12:00 AM
C45/20/13 12:00 AM
D55/21/13 12:00 AM
E65/22/13 12:00 AM

I want That
  Result From Above

IdDateRow No
A15/12/13 12:00 AM1
A15/13/13 12:00 AM2
A15/14/13 12:00 AM3
A15/15/13 12:00 AM4
B25/16/13 12:00 AM1
B25/17/13 12:00 AM2
C45/18/13 12:00 AM1
C45/19/13 12:00 AM2
C45/20/13 12:00 AM3
D55/21/13 12:00 AM1
E65/22/13 12:00 AM1
14 Replies
Not applicable

hi

try to use iterNo() function

see attached file

hope this helps you

Regards

Not applicable

Hi Zainab,

   You can use the Recno() Function like below

Load

     id,

     Date,

     Rowno() As Rowno

From Table1;

Regards,

Santhosh G

Peter_Cammaert
Partner - Champion III
Partner - Champion III

See this discussion Re: Re: Numbering Rows more examples? for an example QVW that solves your problem and two other numbering schemes you may have to deal with in the future.

Good luck,

Peter

tresesco
MVP
MVP

AutoNumber(Date) as RowNo  ?

Not applicable

hi

According to your requirement. try this code or see attachment.

[Original Data]:

LOAD Id, date(Date#(Date,'M/DD/YY hh:mm TT'),'M/DD/YY hh:mm TT') as Date_new,

if(Previous(Id)<>(Id),1, RangeSum(1,Peek(RowNo))) as RowNo ;

LOAD * Inline [

Id,    Date

A1,    5/12/13 12:00 AM

A1,    5/13/13 12:00 AM

A1,    5/14/13 12:00 AM

A1,    5/15/13 12:00 AM

B2,    5/16/13 12:00 AM

B2,    5/17/13 12:00 AM

C4,    5/18/13 12:00 AM

C4,    5/19/13 12:00 AM

C4,    5/20/13 12:00 AM

D5,    5/21/13 12:00 AM

E6,    5/22/13 12:00 AM



then output like this--


IdDate_newRowNo
A15/12/13 12:00 AM1
A15/13/13 12:00 AM2
A15/14/13 12:00 AM3
A15/15/13 12:00 AM4
B25/16/13 12:00 AM1
B25/17/13 12:00 AM2
C45/18/13 12:00 AM1
C45/19/13 12:00 AM2
C45/20/13 12:00 AM3
D55/21/13 12:00 AM1
E65/22/13 12:00 AM1
zturaiki
Contributor III
Contributor III
Author

the data i have not load in order

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi Zainab,

Try below syntex.

Ex:

AutoNumber(Date,Id) as RNo

Not applicable

Yu need to sort it if you want to do that

Do a second resident load and do an ORDER BY

Fabrice

zturaiki
Contributor III
Contributor III
Author

resident load , is difficult , table size is very big