Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to add a sequencenumber (based on date) within a same articlenumber

Hi,

I need to create %2TalSeq:

Within the same value of %2Tal , the numbering has to restart at 1.

%2TalDate%2TalSeq
°1°2°26-12-20081
°1°3°14-05-20041
°1°3°10-12-20042
°1°3°29-09-20063
°1°3°24-08-20074
°1°4°09-04-20041
°1°4°26-11-20042
°1°4°27-07-20073
°1°5°12-02-20101
°1°6°25-11-20051
°1°6°29-09-20062

Thanks

Paul

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

If you need to do it in the script, you can use functions previous() and peek() to compare the value of the Items and assign the Counter accordingly.

Something like this:


load
Item,
Date,
if(previous(Item) <> Item, 1, peek(Counter) + 1) as Counter
resident
Tab1
Order By
Item, Date
;


Not applicable
Author

Oleg,

Thank you.

Paul