Forum Academy Marketplace Showcase Pricing Features

Calculation a dynamical discount

Hello! I need to create calculation a dynamical discount in customer order. Discount size for customer depends on amount of purchases in current month.
I have 3 sizes:
30% - amount of purchases in current month is less than 10000
35% - amount of purchases in current month is 10001-20000
40% - amount of purchases in current month is more than 20001
How I can create it?