Sum sales applying different and unique Date Ranges for each Store
I need to SUM Sales for each store acording to the specific and unique date_range for each store.
In the a Qlik Sense app there are two tables as follow.
NOTE: Time format is DD/MM/YYYY
Store ID Sales Date
1 100 01/01/2019
2 120 02/01/2019
Store ID Start_Date End_Date
1 01/01/2019 31/01/2019
2 01/02/2019 17/02/2019
.... ..... ....
100 01/03/2019 14/04/2019
I need to SUM Sales for each store acording to the specific and unique date_range on the DATE_RANGE_TABLE (Start_Date to End_Date) for each store.
So For example:
If I sum sales I will have the Sales for Store 1 from 01/01/2019 to 31/01/2019 and for store 2 from 01/02/2019 to 17/02/2019, and the same thing for the other 98 stores according to the date range that appears on the DATE_RANGE_TABLE