I have the following data the situation is that against one id there are multiple status and dates. what I need is to count the top status after the status is changed from open to inprogress in the given scenario I only need the the top three status which is Inprogress and its count is 3 .