I'm currently stuck with this problem. Suppose I have the following daily data
+-------------------------------+----------
| Date | Total |
+-------------------------------+----------
| 2016-08-01 00:00:00.000 | 10 |
| 2016-08-02 00:00:00.000 | 10 |
| 2016-08-03 00:00:00.000 | 20 |
| 2016-08-04 00:00:00.000 | 40 |
| 2016-08-05 00:00:00.000 | 20 |
| 2016-08-06 00:00:00.000 | 10 |
| 2016-08-07 00:00:00.000 | 50 |
| 2016-08-16 00:00:00.000 | 57 |
| 2016-08-17 00:00:00.000 | 52 |
+-------------------------+-----+----------