Is there an easy way to do this partitioning?

Hi,

I have seen previous posts on partitioning, and use that technique regularly. However, my need this time is slightly different. I have groupings of duplicates, but I would like to count incrementally when I come across a new identifier. I actually have this working now, but it took some Aperture kung-fu, so wondering if anyone has a simple way to do this.

The column I am focusing on to create is ID_NUM, I only want it to increment within the GROUP when a new IDENTIFIER is found, otherwise keep the existing ID_NUM. (ID_TOT shows how many unique IDs there are in the group.)

Thanks

GROUP

IDENTIFIER

ID_TOT

ID_NUM

AAAA

12345

4

1

AAAA

99999

4

2

AAAA

99999

4

2

AAAA

54321

4

3

AAAA

11111

4

4

AAAA

11111

4

4

BBBB

90210

3

1

BBBB

90210

3

1

BBBB

77777

3

2

BBBB

13579

3

3

BBBB

13579

3

3

Answers