Another possible appoach would be to use a select statment to look at records in the last year as
{MEMB_HPHISTS_V.HPFROMDT} in today to (dateadd("yyyy",-1,today))
then group on the months
then add a formula field to conditionally count the records on your other criteria and then insert a summary to sum that formula field at the month group level.
"{MEMB_HPHISTS_V.HPFROMDT} in Date (2007, 10, 01) to Date (2007, 10, 31)"
would be handled by grouping on the month
Set up a formula field called something "Monthly_Count" as:
"if IsNull ({MEMB_HPHISTS_V.OPTHRUDT}) and ({MEMB_HPHISTS_V.CURRHIST}) = "C" and Count({MEMB_HPHISTS_V.OPT},{@MEMBER}) = 1 then 1 else 0"
will handle the
"and IsNull ({MEMB_HPHISTS_V.OPTHRUDT}) and ({MEMB_HPHISTS_V.CURRHIST}) = "C" and Count({MEMB_HPHISTS_V.OPT},{@MEMBER}) = 1"
Do a summary as a SUM of the @Monthly_Count field at the group level of the month and you should have what you are looking for.