Alert based on percentage change of aggregated, weekly averages

I want to set alert to compare with average from now to 7 days ago (A), and 7 days ago to 14 days ago (B). Then notify me if the change % between A and B is greater than 10%.

My b could’ve been more clear on my goal. Thanks for the help!