# Need 2 different totals for different time frames....Subreport?

Hi everyone!!

I'm trying to calculate a formula, {@Sum of Savings}, to show up as a year-to-date and a current month calculation at the end of my report.

Right now I have the {@Sum of Savings} in the Report Footer and it calculates correctly for whatever time frame I put in the Report > Select Expert > Record.

Can I have the {@Sum of Savings} formula calculate, for example, a current month's worth of records (like March) as well as the year-to-date (like Jan-March) both in the Report Footer.....or somewhere else? Would I need a subreport for this?

Thanks!!

Rich

##### Abhilash Kumar replied

You would just need two separate formulas - one that calculates the YTD and one for MTD.

1) The YTD formula would be:

IF {Date_field} IN YearToDate then

{Measure_Field}

Next, go to Insert Summary > Choose the YTD formula field > Choose Sum as the summary function and place this summary on the Report Footer

2) The MTD formula would be:

IF {Date_field} IN MonthToDate then

{Measure_Field}

You would then insert a summary on this formula field as well.

**-Abhilash**