Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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?




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


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


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


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question