ID season gasyear recordno 2401562901 Summer 19/20 1 2401562901 Winter 19/20 2 2401564310 Summer 19/20 1 2401564310 Summer 19/20 2 2402213802 Summer 19/20 1 2402213802 Summer 19/20 2 2402412909 Summer 19/20 1 2402412909 Summer 19/20 2 2416061809 Winter 19/20 1 2416061809 Summer 18/19 2
Hi,
I want to create a column based on the following rules:
it needs to look at each unique ID (there are only 2 rows per id).
is the season for record 1 'Summer' and season for record 2 'Summer'
and are the gasyear for record 1 and record 2 the same
if so it would give a flag 'Y' else 'N'
I have tried coding a few options and they don't work
i tired the lag function but it doesn't work when going on to a new id
thanks
... View more