I have 3 columns (Date, Flag, cost) The date starts from the beginning of the year, the flag is either daily or monthly and the cost.
For daily values it is fine. For monthly values, I would like to Sum the entire monthly flaged values and divide by the number of days in that month. The resulted rate, populate it in the entire month
Date Flag Cost
1/1/2014
1/2/2014 DAILY 10
1/3/2014 DAILY 15
1/4/2014 DAILY 56
1/5/2014 DAILY 22
1/6/2014 DAILY 32
1/7/2014
1/8/2014 MONTHLY 3500
1/9/2014
1/10/2014
Result should be
Date Cost
1/1/2014 112.9032258
1/2/2014 122.9032258
1/3/2014 127.9032258
1/4/2014 168.9032258
1/5/2014 134.9032258
1/6/2014 144.9032258
1/7/2014 112.9032258
1/8/2014 112.9032258
1/9/2014 112.9032258
1/10/2014 112.9032258
.
.
.
1/30/2014 112.9032258
1/31/2014 112.9032258