I have a .dbf that has ID, YEAR, CODE
ID starts at 1 and every ID has 9 YEARS with an associated CODE for that given year (always 1990 to 1998 inclusive) . Therefore the same ID is 9 features long with some sort of CODE associated with it (one of 5 choices).
What i want to do is start counting at 1 when a CODE becomes different, grouped by ID. So the first year per ID is always going to be 1 while the 2nd year could be 2 (if the same CODE) or stay at 1 if the CODE is new.
Sadly, if you use the 'hidden' GroupBy function in Counter transformer and set it to attribute ID you will get a count that is not 1 anymore when that CODE occurs again. I've tried using Multiple Feature Support in Attribute Creator but again this is not working.
My basic need is this, with the new COUnt attribute;
ID---YEAR---CODE---COUNT
1----1990-----A-----------1
1----1991-----B-----------1
1----1992-----B-----------2
1----1993-----B-----------3
1----1994-----E-----------1
1----1995-----E-----------2
1----1996-----A-----------1
1----1997-----A-----------2
1----1998-----A-----------3
Thanks in advance