Aggregating objects by time range


I have a dataset in the below structure:
| Id | startDate | endDate |


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 |


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 between startDate and endDate?


The easiest way I can think about is using 2 filters, one for the StartDate and other for endDate. Create 2 dates picker like in the image to filter the range you want to analyze.
In a second visual, a KPI for example, you can load a calculated field:
distinct_count({Order ID})

Thank you, but my purpose was to aggregate # of Id’s per day in the time range.
distinct_count doesn’t provide it.