How to sum a single fiscal period for monthly expenses and also sum ytd expenses
Author Message
How to sum a single fiscal period for monthly expenses and also sum ytd expenses

Hi everyone,

I have a problem I'm hoping someone can help me with.  I need to include
both monthly and ytd expenses for a department expense report.  If I allow
the user to enter the period as an input parameter in order to determine
monthly expenses(i.e. period 3), how can I then get  and sum all the entries
for a department for the fiscal year(i.e. for period 1 + 2 +3)?  I'm really
puzzled by this one--any suggestions would be much appreciated.

Thanks,

Sue

Tue, 28 Jan 2003 03:00:00 GMT
How to sum a single fiscal period for monthly expenses and also sum ytd expenses
Here's a suggestion to start:
Create 3 formulas:  Period1, Period2, Period3.
Here's the code for each formula, substituting the correct table name
and months for each:
If {table.Month}=1 or {table.Month}=2 or{table.Month}=3 then
{table.ExpenseAmt}
Place all three formulas in the correct section and suppress them.
Then create a sum for each formula.
When added (SumPeriod1+SumPeriod2+SumPeriod3), you should get YTD.

Maybe I'm completely off from what you want, but it's the first idea that
came to mind.

Paul Benner

Quote:
> Hi everyone,

> I have a problem I'm hoping someone can help me with.  I need to include
> both monthly and ytd expenses for a department expense report.  If I allow
> the user to enter the period as an input parameter in order to determine
> monthly expenses(i.e. period 3), how can I then get  and sum all the
entries
> for a department for the fiscal year(i.e. for period 1 + 2 +3)?  I'm
really
> puzzled by this one--any suggestions would be much appreciated.

> Thanks,

> Sue

Tue, 28 Jan 2003 03:00:00 GMT
How to sum a single fiscal period for monthly expenses and also sum ytd expenses

Paul,

I'm not sure I understand what you mean.  I'm not really clear about how to
separate the rows which reflect all the periods(the sum of which would be
ytd), and the rows which reflect just the particular period in
question(which would be monthly expenses).   For example, if we were in
period 5, the user would enter 5 for the period, and the sql would get all
those detail rows for which the period was 1 or 2 or 3 or 4 or 5.  Summing
the amount in these rows would give the ytd amount.  For the monthly amount
I would need to subtract those rows where the period was 1,2,3, or 4.  I
can't see how to do that in crystal(I'm not using vb).

Thanks,

Sue

Quote:
> Here's a suggestion to start:
>     Create 3 formulas:  Period1, Period2, Period3.
>     Here's the code for each formula, substituting the correct table name
> and months for each:
>         If {table.Month}=1 or {table.Month}=2 or{table.Month}=3 then
>             {table.ExpenseAmt}
>     Place all three formulas in the correct section and suppress them.
>     Then create a sum for each formula.
>     When added (SumPeriod1+SumPeriod2+SumPeriod3), you should get YTD.

> Maybe I'm completely off from what you want, but it's the first idea that
> came to mind.

> Paul Benner

> > Hi everyone,

> > I have a problem I'm hoping someone can help me with.  I need to include
> > both monthly and ytd expenses for a department expense report.  If I
allow
> > the user to enter the period as an input parameter in order to determine
> > monthly expenses(i.e. period 3), how can I then get  and sum all the
> entries
> > for a department for the fiscal year(i.e. for period 1 + 2 +3)?  I'm
> really
> > puzzled by this one--any suggestions would be much appreciated.

> > Thanks,

> > Sue

Fri, 31 Jan 2003 03:00:00 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages