I am trying to get the previous value of a specific column based on unique identifiers. Please see the example. The calculation should be “start date - end date from previous period”. If it is the first period for that specific ID, then the end date from the previous period should be set equal to the default date. The dataset has multiple IDs.
Read more here: https://stackoverflow.com/questions/64396524/lag-function-in-sas