DBlank would probably say running totals, but alas, that is not my forte.
I would say shared variables. You would want to set them zero, at some point. Obviously MTD would be when the month changes, and YTD at the year change. You would want to display them in a footer, probably for month and year. These are pretty easy formulas:
shared numbervar MTD :=0;
shared numbervar YTD :=0;
"" //this sets to 0...remove the :=0 and just one at a time to display the values....you don't have to do both at the same time (and wouldn't want to, this just shows syntax)
But how do we increment the values. A formula that would be dropped in the details section, could make it really simple, like:
shared numbervar MTD := MTD +{table.field};
shared numbervar YTD := YTD +{table.field};
"" //this just hides the results of the formula
HTH