|Invoice ID| planned amount| date|
|3|. 200|. 10/06/2022|
|3|. 300|. 23/06/2022|
|3|. 400|. 31/07/2022|
|4|. 700|. 19/06/2022|
|4|. 1000|. 23/06/2022|
|4|. 600|. 30/07/2022|
Hello there,
I have a table akin to the above where an amount can change over time for an ID. For ID 3, up until and including 22/06/2022, the amount was 200. From 23/06/2022 to 30/07/2022, the amount was 300 and from 31/07/2022 and onwards it is 400.
This table is joined to a calendar table on date and there will be date filter.
I want to be able to show the total amount at a point in time based on the date filter.
For e.g. if 01/08/2022 is selected on the filter, 1000 (400 + 600) will show as the total planned amount as the amounts included have dates that are closest to and on or before 01/08/2022 for both IDs (31/07 and 30/07). For filter date of 20/06/2022, the total planned amount would be 900 (200 + 700) as ID 3 has date 10/06/2022 which is before the 20/06/2022 and ID 4 has a date of 19/06/2022 ie the closest date to the filter that is on or before the filter date.
The date filter will be used to show the planned amount total at the point in time of the date selected. Is this possible?
thanks in advance.