Sample data, data is sorted by date asc:
ID[tab] date
123[tab]4/1/15
555[tab]1/1/15
123[tab]4/15/15
123[tab]4/25/15
555[tab]1/20/15
I'm looking to add a new column calculating the difference between dates from previous record with matching ID.
So the results should be:
ID[tab] date[tab] daydiffCt
123[tab]4/1/15[tab]
555[tab]1/1/15[tab]
123[tab]4/15/15[tab]14[tab](4/15-4/1)
123[tab]4/25/15[tab]10[tab](4/25-4/15)
555[tab]1/20/15[tab]19[tab](1/20-1/1)
Any suggestions appreciated.
Thanks
ID[tab] date
123[tab]4/1/15
555[tab]1/1/15
123[tab]4/15/15
123[tab]4/25/15
555[tab]1/20/15
I'm looking to add a new column calculating the difference between dates from previous record with matching ID.
So the results should be:
ID[tab] date[tab] daydiffCt
123[tab]4/1/15[tab]
555[tab]1/1/15[tab]
123[tab]4/15/15[tab]14[tab](4/15-4/1)
123[tab]4/25/15[tab]10[tab](4/25-4/15)
555[tab]1/20/15[tab]19[tab](1/20-1/1)
Any suggestions appreciated.
Thanks