What they probably need is to track the last quarter value when it is output. The above solution doesn't work for the first quarter of a year (need to compare to last quarter of previous year).
isFirstValue = true
previousValue = 0
currentValue = getQuarterlyValue()
output "sales for this quarter = $" currentValue
if not isFirstValue output "quarterly increase = $" currentValue - previousValue
isFirstValue = false
previousValue = currentValue