Core hq total row

originally https://github.com/dimagi/core-hq/pull/972