I have a panel data with to identifiers: ID and Time. The dataset contains the following variables: ID, Time and V1. I want to create a fourth variable Flag which will identify the first date where V1 > 0 for each ID. For eg: The third observations identifies the third month as the first occurrence of a positive V1 for ID = 1. Again the seventh observation identifies the second month as the first occurrence of a positive V1 for ID = 2 . Thanks in advance.