Selecting only most recent contact by user

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Auramin
Posts: 1
Joined: Thu Jun 22, 2017 12:00 pm

Selecting only most recent contact by user

Postby Auramin » Thu Jun 22, 2017 12:09 pm

I'm sorry if this question is easily answered but I've tried to seaerch for a solution to my problem without result.

I have a dataset with my users identified as a numerical value in a variable called UserID. I have multiple records for each time a user has contacted me, however I am only interested in data from the most recent contact. I have date of contact sorted as a date-format in a variable named Date.

So far I've been advised to use lead and lag, or rank. However I've not been able to actually get what I need. I'd like to either delete all data except the most recent contact, or simply select it for analysis.

Anyone with a piece of advice on my problem?

Thanks in advance !

Best,
Nicolai

Who is online

Users browsing this forum: No registered users and 3 guests

cron