Complex discount calculation ( time period,customer,products)

Melissa

i uploaded an excel file that calculates the discount amount in detail for customer A
my initial pbix file is not correct because I had no idea how to calculate the surplus when the cumulative sales moves to the next bracket.
If this to difficult I will continue the calculations in excel.
thanks in advance.

Roger
excel for Melissa.xlsx (16.9 KB)