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 847
3 REPLIES 3

Maddie
New Member

Hi Bryan,

I have managed to get this to work using a two step process:

STEP 1: Order the data by date and flag the first row for each date

Code:
if(${order_items.created_date}=offset(${order_items.created_date},-1),0,1)

STEP 2: Create a running total for the calculation in STEP 1

Code:
running_total(${first_date})

The output looks like this:

(the first date flag can be hidden)

Best,
Maddie | Redkite

Hi Maddie!

I have just put in my explore your solution and it works!!!
I only needed running total function 😅

¡Muchas gracias!

Maddie
New Member

Hi Bryan,

Glad it worked 👏

Best,
Maddie | Redkite

Top Labels in this Space
Top Solution Authors