I`m trying to work out a formula, on how to get the MAX amount, for any 30 day consumption period, for a certain item, when all the criteria are in one data table.
I have created a formula in column D, that Sums up the amount used in the last 30 days.
The Pivot table in columns A & B contain data from Data sheet. Image below :
It contains 8665 rows for 1195 Item nr. Date when the item has been used.
In the first Image cell J4 should contain a formula of MAX amount used in during any 30 day period and I can`t work out this formula and I`m asking for your help.

I have created a formula in column D, that Sums up the amount used in the last 30 days.
The Pivot table in columns A & B contain data from Data sheet. Image below :

It contains 8665 rows for 1195 Item nr. Date when the item has been used.
In the first Image cell J4 should contain a formula of MAX amount used in during any 30 day period and I can`t work out this formula and I`m asking for your help.