monthly_sums = aq.from(fails)
.derive({
month: aq.escape(d => d3.timeFormat("%m")(d.Date)),
year: aq.escape(d => d3.timeFormat("%Y")(d.Date))
})
.derive({month: aq.escape(d => new Date(Date.UTC(d.year, d.month, 1)))})
.groupby('month')
.rollup({
failures: d => op.count(),
total_assets: d => op.sum(d.Assets)
})