hi,
I have a dataset in the below structure:
| Id | startDate | endDate |
|111|02/04/2022|06/04/2022|
|222|01/04/2022|04/04/2022|
|333|04/04/2022|06/04/2022|
|444|03/04/2022|06/04/2022|
I want to know how many id’s are exist within each date in the time range.
so the result should appear as below-
| Date | idCount |
|01/04/2022|1|
|02/04/2022|2|
|03/04/2022|3|
|04/04/2022|4|
|05/04/2022|3|
|06/04/2022|3|
is there any aggregation function that enables do preform this kind of calculation?
do I have to make a data preparation of joining time dimension of all relevant dates with the original dataset where dim_time.date between startDate and endDate?
thanks,
Amihai