Creating an analysis table that rectifies the local date and only keeps relevant information for aggregation