Re: Calculate Monthly Aggregated Data



Hi, LCK

I'd suggest (but beware I am not an expert at all in Access: just
trying to use common sense) that you add a missing piece of information
(the dates where you want to do the calculation).
For instance You can add a small table with 1 field (Period) and the
following data (it holds in general if you have different time
occasions):

------ Table DatesMo --------
01/01/2006
01/02/2006
01/03/2006
01/04/2006
01/05/2006
---------------------------------------

Then it should be simple to make a join which yelds your result (you
probably need a right outer join followed by an inner join). The
EndingStock can be obtained, I guess, by subtraction from the
InitialStock of the cumulative Consumption. The latter can be obtained
by a simple subselect.

Clearly there are many other ways to do that, and I am sure the many
experts that are here will be able to advise you regarding the very
best way...

-tom

LCK ha scritto:

Hi,
I'd appreciate if you could help me to perform the following
calculations:

I Begin with two Tables:

Table1
Period InitialStock
12/2005 100

Table2
Period Consumption
01/2006 10
02/2006 30
03/2006 10
05/2006 20

Which operations do I have to perform between those two tables to get
to the Following table:

Period EndingStock
01/2006 100-10 = 90
02/2006 90-30 = 60
03/2006 60-10 = 50
04/2006 50-0 = 50 (There was no consumption in Apr-2006)
05/2006 50-20 = 50

Regards
LC

.



Relevant Pages

  • Re: Calculation bug or is it me
    ... Yes I was missing the obvious Ron, as Mister T and Bernie and Loz had also ... pointed out...thanks for the response. ... Tom ... I get expected results from the calculation. ...
    (microsoft.public.excel.programming)
  • Calculation bug or is it me
    ... what am I missing here. ... Using XL2K3 XP, no problems with my computer, trying to divide a series of ... numbers by 100, then multiplying that quotient by 100, and getting illogical ... The problem is I need to do this calculation programmatically and the result ...
    (microsoft.public.excel.programming)
  • Calculation bug or is it me
    ... what am I missing here. ... >Using XL2K3 XP, no problems with my computer, trying to ... I get expected results from the calculation. ... the 100 numerator needs to be a static ...
    (microsoft.public.excel.programming)
  • Re: This doesnt add up / have I been rooted?
    ... Well, you're missing the term 1GB/1024MB, which brings the total to ... What you are "missing" in your calculation is called the Terms of Service, ... calculated within a certain time window, e.g. the normal business day, ... get a better sense of what is actually passing through the gateway interface ...
    (comp.os.linux.security)
  • Re: This doesnt add up / have I been rooted?
    ... Well, you're missing the term 1GB/1024MB, which brings the total to ... What you are "missing" in your calculation is called the Terms of Service, ... calculated within a certain time window, e.g. the normal business day, ... get a better sense of what is actually passing through the gateway interface ...
    (comp.os.linux.security)