I will try to explain what I want to do. I am looking for an algorithm or approach, not an actual implementation in my particular system.
I have a table with actions (incoming customer requests) on a daily basis. This evidence should be copied next year, where it will be used as the basis for planning future requests. The smallest amount of time for planning, on a technical basis, is a “period” that consists of at least one day. The period always changes after a week or a month. This means that if the week is in May and June, it will be divided into two periods.
Here is an example:
2010-05-24 - 2010-05-30 Week 21 | Period_Id 123
2010-05-31 - 2010-05-31 Week 22 | Period_Id 124
2010-06-01 - 2010-06-06 Week 22 | Period_Id 125
We did this to reduce the amount of data, because we have several thousand elements that have 356 daily values. For planning, this is reduced to "several thousand x 65" (or regardless of the number of periods per year). I can fill in a month or a week by combining all periods related to one month. The important thing in this, I can still use daily values, then find the appropriate period and add it there if necessary.
, () , . . , , . , , , .