Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I need to compare the id's in the script level only. i tried to use peek and previous function this will compare by row wise not with previous month.
sample data attached
Thanks,
Shruthi
Hi,
Flag_Table:
LOAD *,
if( Previous(ID)=ID and AddMonths(previous(Date),1)=Date,1,0) as Flag_Test
Resident Date
order by ID, Date;
drop table Date;
Where the date is the table you have, but you need to ensure that you read the data as data, with DATE#(Date,'MM/DD/YYYY') as Date.
Best regards,
Cosmina
Why is this 0?
you should to use above function in chart, previous in script
please look at example in my app
Hi,
Flag_Table:
LOAD *,
if( Previous(ID)=ID and AddMonths(previous(Date),1)=Date,1,0) as Flag_Test
Resident Date
order by ID, Date;
drop table Date;
Where the date is the table you have, but you need to ensure that you read the data as data, with DATE#(Date,'MM/DD/YYYY') as Date.
Best regards,
Cosmina
ya it should be 1
Did you look at the cocosmina's response? It should have worked for you.... Is it not working?
Thank you