In the attached is your pivot at cell G2, then at cell G18 there's a pivot based on a query of the table at cell A1.
The query does the following:
- Grabs the table at cell A1
- Works out a cutoff date by subtracting 3 months from the latest date in the table
- Filters the table for only dates after that cutoff (the last 3 months)
- Filters the table for sales <=5
- Groups using account and name counting how many rows in each group
- Filters that count for 2 or more which leaves us with a small table of accounts and names
- which is merged (joined) with the original table to retrieve all the months' data for just those accounts/names
- which is then pivoted on the sheet.
Bookmarks