LloydDobler
Technical User
I need to create a query that helps satisfy this:
I need to calculate a monthly savings...easy enough, just divide annual savings by 12. But I need to calculate the annual savings based on the month the project was implemented (DATE field). so, my annual savings for P#1 would be 12,000, whereas my annual savings for P#2 would only be 10,000. The leftover 2,000 would carry forward to 2008. That brings in my second part. I need to be able to calculate a rolling 12 month YTD savings (realized). So, need to add all P# est monthly savings for past 12 months.
Table (I've used 12,000 for all projects to make things simpler for calculating)
P# DATE annual SAVINGS
1 01/01/07 12,000
2 03/03/07 12,000
3 07/07/07 12,000
4 10/10/07 12,000
5 02/02/08 12,000
6 03/03/08 12,000
Example:
2007 est annual savings would be 12,000 (P#1) + 10,000 (P#2) + 6,000(P#3) + 3,000(P#4)= 28,000
2008 est annual savings would be 2,000 (P#2 carry over) + 6,000 (P#3 carry over) + 9,000 (P#4 carry over) + 11,000 (P#5) + 10,000 (P#6) = 38,000
YTD realized savings would be 9,000 (P#3->6 months of 07 + 3 months of 08) + 6,000 (P#4) + 2,000 (P#5) + 1,000 (P#6) = 18,000
Now...I haven't a clue where to begin to write this! I hope it makes sense! Would love some guidance or a point in the right direction. please and thanks.
"I don't want to sell anything, buy anything or process anything as a career. I don't want to sell anything bought or processed... or buy anything sold or processed... or process anything sold, bought or processed... or repair anything sold, bought or processed. You know, as a career, I don't want to do that."
I need to calculate a monthly savings...easy enough, just divide annual savings by 12. But I need to calculate the annual savings based on the month the project was implemented (DATE field). so, my annual savings for P#1 would be 12,000, whereas my annual savings for P#2 would only be 10,000. The leftover 2,000 would carry forward to 2008. That brings in my second part. I need to be able to calculate a rolling 12 month YTD savings (realized). So, need to add all P# est monthly savings for past 12 months.
Table (I've used 12,000 for all projects to make things simpler for calculating)
P# DATE annual SAVINGS
1 01/01/07 12,000
2 03/03/07 12,000
3 07/07/07 12,000
4 10/10/07 12,000
5 02/02/08 12,000
6 03/03/08 12,000
Example:
2007 est annual savings would be 12,000 (P#1) + 10,000 (P#2) + 6,000(P#3) + 3,000(P#4)= 28,000
2008 est annual savings would be 2,000 (P#2 carry over) + 6,000 (P#3 carry over) + 9,000 (P#4 carry over) + 11,000 (P#5) + 10,000 (P#6) = 38,000
YTD realized savings would be 9,000 (P#3->6 months of 07 + 3 months of 08) + 6,000 (P#4) + 2,000 (P#5) + 1,000 (P#6) = 18,000
Now...I haven't a clue where to begin to write this! I hope it makes sense! Would love some guidance or a point in the right direction. please and thanks.
"I don't want to sell anything, buy anything or process anything as a career. I don't want to sell anything bought or processed... or buy anything sold or processed... or process anything sold, bought or processed... or repair anything sold, bought or processed. You know, as a career, I don't want to do that."