I know there are several threads on this topic but I can’t find a solution that works for my specific case.
I have ids that are representing stock at with different status at a time(in-stock, in-progress, delivered). I have a Date field that is available for status change. My goal is to count the ids at a certain time that are in stock and then when I select a date that is greater than the first one to only display delivered ids which were present on the date selected for stock ones. So to exclude delivered ids that have different than the originally selected stock date.
I have only one Date field that changes with status change as mentioned above. Example:
Id Date Status
123 03/02/2022 In-stock
123 03/05/2022 Delivered
234 03/02/2022 in-Stock
234 03/05/2022 Delivered
566 03/04/2022 In-Stock
566 03/05/2022 Delivered
Click here for table view: enter image description here
So goal is when I select 03/02/2022 there are 2 ids in stock for this date. And when I select delivery date 03/05/2022 I only want to count those 2 orders that were in-stock that 03/02/2022 date and exclude id 566 although is delivered but was not in stock on 03/02/2022 but came in later.
I’m sorry if it not clear. I can add more details if needed