Fields

In the pivot table shown, there are three fields in the source data: Date, Sales, and Filter. Filter is a helper column with a formula flagging the last 12 months. The Date field has been grouped by Year and Month:

Formula

The formula used in E5, copied down, is: This formula returns TRUE when a date is greater than or equal to the first day of the month 12 months earlier and when the date is less than the last day of the previous month. The formula uses the AND, TODAY, and EOMONTH functions as explained here.

Steps

Author

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.   

Pivot table last 12 months - 97