Are you getting new files or is the data updated in the same file?

I would have 2 pivots with one filtered on A and another on B then have a dynamic named range wrapped around the two pivots.