I am looking for a solution for the following: I have a dataset as follows ID Pass Type Transaction_Amount Start_date End_date 1 30D $30 01072016 31072016 2 30D $30 03072016 02082016 3 7D $14 02072016 08072016 I would like to have a dataset where for each of the ID, I can spread the the transaction amount over the start date and end date. For example, if ID=1 purchased a 30D pass on the 3/7/2016, I would like to distribute the transaction_amount which is $30 over the the validity of the 30D pass which is denoted by the start_date and the end_date. The final table would have the data above + columns for dates (starting with the earliest start_date in the dataset) and within each date column there should be the value of the pass for each day which in the case for ID=1 would be $30/30 = $1 and for the case of ID=3 would be $14/7=$2 for each day beginning from the start_date all the way to the end_date. This is what i'm seeking ID Pass Type Transaction_Amount 01072016 02072016 03072016 .......... 31072016 01082016 02082016 1 30D $30 1 1 1 1 2 30D $30 1 1 1 1 3 7D $14 2 2
... View more