I have a series of events with a Start and End date, with a Value and a series of other attributes.
Country --- Location --- Start-Date --- End-Date --- Value per day
Italy Rome 2018-01-01 2018-03-15 50
Belgium BXL 2017-12-04 2017-12-6 120
Italy Milan 2018-03-17 2018-04-12 80
I want to convert this, in DAX, to a monthly time-series like:
Country --- Location --- Month --- Value per day
Italy Rome 2018-01 50
Italy Rome 2018-02 50
Italy Rome 2018-03 22.58 (= 50 /31*(31-17) days)
The value is a weighted average of industrial capacity. I have done this with a CROSS JOIN with the Calendar table, but this is quite heavy and requires to calculate each possible value, while a calculation on-the-fly would be likely faster.
Any help? Many thanks