Add table footers with totals