12-11-2012 04:16 PM
I have a total of 56 possible dates variables (CDfour1, CDfour2, CDfour3, etc.) where patients visited the clinic to have their CD4 value determined. Not every patient will have a total of 56 dates, so may have been loss to follow up (i.e. stopped coming to the clinic, etc.) I need to determine the last date each patient came into the clinic. I know the COALESCE function returns the FIRST non-missing value for a variable, but is there a function that returns the LAST non-missing value? Will the COALESCE function work for this? Thanks.
Need further help from the community? Please ask a new question.