Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to retain accurate measure values when using Lag or Fsum with monthly aggregation?

Summary:

When using the Lag function to retrieve past measure values, it cannot retrieve the correct value if the past data is displayed on a monthly basis.

For example:

Custom PAB = Nvl(Lag(Custom PAB, 1), 0) Nvl(On Hand, 0) Nvl(Planned Order, 0)- Nvl(Net Forecast, 0)-Nvl(Sales Order, 0)....
Assume the Custom PAB on 30-Nov is 971, and the Custom PAB on 1-Dec is 3971 (calculated as 971 + 3000 supplies - 0 demand).

If the data for November and December is displayed daily, the results are shown correctly.
However, when November is collapsed and displayed as monthly data, the Custom PAB on 1-Dec becomes 3000. Is there a way to prevent this issue?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!