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
Why is this 0?
ya it should be 1
Did you look at the popescu cosmina's response? It should have worked for you.... Is it not working?
you should to use above function in chart, previous in script
please look at example in my app
if( Previous(ID)=ID and AddMonths(previous(Date),1)=Date,1,0) as Flag_Test
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.
Retrieving data ...