Hello everyone, I am new to programming and I would like to create a calculated column in a calculated view of S/4HANA. The table structure is shown in the image and I would like to calculate the difference in amount between the highest week (max("Week")) and the week before it.
I have tried to design an if condition: if("Week" = max("Week"),max("Week")-(max("Week")-1),0,) but I don't know how to reference the amount column there , since I want it to calculate the difference of the amount. How could I do this? Is there an easier way to do it with a when case or something similar? I would be very grateful for your help.
All the bestduda.png