Optimized performance for grouping monthly factsby year.