To create a pivot table that shows the last 4 weeks of data (i.e.
Filter is a helper column with a formula flagging the last 4 weeks.
Week is a helper column that returns the Monday for any given date (for convenience only).
It returns TRUE when a date is in the last 4 complete weeks, and FALSE if not.
See the link for a full explanation.
For example, to display the last 6 weeks (42 days), use: