I have a dataset including company name, fiscal year, and fiscal quarter, and I am encountering an issue about data selection. For example, there is a data set of a company in year 1980. There are four possible quarterly data named as Q1, Q2, Q3, and Q4, some of them missing. Now, I want to get the latest one as if the company has all four data, I choose Q4. If the company has data Q2, and Q3, I will pick Q3. If the company has data Q1, and Q3, I will pick Q3, and so on. Could anyone please tell me how to do this please. Thank you so much and happy thanksgiving.
... View more