Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help Numbering a Group

I'm struggling with the following problem. 

I currently have the following data:

Person
Date
Person13/1/2015
Person16/1/2015
Person110/2/2015
Person23/15/2015
Person24/15/2015
Person209/20/2015
Person31/2/2015

I would like to iterate through the data and create a third column that numbers the two columns above in chronological order for each unique "person" value.  The data would look like table below. 

PersonDateNumber
Person13/1/20151
Person16/1/20152
Person110/2/20153
Person23/15/20151
Person24/15/20152
Person209/20/20153
Person31/2/20151

Thanks in advance. 

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

LOAD AutoNumber(Person&Date,Person) as Number,

  Person,

     Date

FROM

[https://community.qlik.com/thread/185296]

(html, codepage is 1252, embedded labels, table is @1);

View solution in original post

4 Replies
simenkg
Specialist
Specialist

temp:

Load Person, Dates from file;

Fact:

Load Person, Date, if(Peek(Person) = Person, Peek(Number)+1, 1) as Number

Resident temp order by Dates asc;

Drop table temp;

MK_QSL
MVP
MVP

LOAD AutoNumber(Person&Date,Person) as Number,

  Person,

     Date

FROM

[https://community.qlik.com/thread/185296]

(html, codepage is 1252, embedded labels, table is @1);

Not applicable
Author

This worked perfectly.  Thank you.

Craig Linderman

MK_QSL
MVP
MVP

Kindly close the thread by selection correct answer !