how to know if my previous row is the same and label it

I would like to know if I can know the previous value of a column and depending on whether it meets the condition, label them. For example, for January 13 I put all those records an identifier 1, and for all records with the date of January 14 the identifier 2, and so on for each record with a different date. I have tried a lot of times but I can’t. could you help me, please?

An example that I would like to do:

0 3 872
3 REPLIES 3
Top Labels in this Space