• Could you do a sum on the values where the invdate equals the max invdate within the month grouping, something along the lines of,

    SUM(IIF(invdate = MAX(invdate,"Month"),InvBalance,0)