Skip to Content
0
Jun 16, 2022 at 09:55 AM

Calculate variations in S/4HANA from one week to the next.

107 Views Last edit Jun 16, 2022 at 10:43 AM 2 rev

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

Attachments

duda.png (13.5 kB)