Improved performance of sales/earnings by date functions