sum(if(sum(amount)<200,amount/10,amount/100) as newPrice
Hi, try the below.
LOAD Product, Amount, Price, Date , NumSum(Amount, Peek('Sum_Amount')) as Sum_Amount , If(NumSum(Amount, Peek('Sum_Amount')) < 200, Price * 0.9, Price * 0.99) as New_Price Resident Products Order By Date asc;
It's just example code, so adjust to your env. I hope it will help you.