Skip to Content
avatar image
Former Member

calculation view - end date based on start date

Hi,

we use graphical calculation views for our data model. how can you get the end date if you only have startdate.

example:

Product_1 | 3000 | 01.01.2018
Product_1 | 3000 | 01.05.2018
Product_1 | 1000 | 01.07.2018

Product_2 | 1000 | 01.02.2018

Expecting result:

Product_1 | 3000 | 01.01.2018 | 01.05.2018
Product_1 | 1000 | 01.07.2018 | 31.12.9999
Product_2 | 1000 | 01.02.2018 | 31.12.9999

Thank you

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 04 at 08:31 AM

    Hi,

    Refer to link below:

    https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.02/en-US/e7ef7cc478f14a408e1af27fc1a78624.html

    Lead/lag functions give you preceding or subsequent records when ordered by required fields. In your case, you can easily get "next" from date using this function. Subtract 1 from this value to get "to date".

    Hope that helps.

    Thanks,

    Anup

    Add comment
    10|10000 characters needed characters exceeded