Former Member

# Formula Question

In Business Objects, I have a date value, for example, 1/1/2016, in one column. I have a 2nd column with an amortization term, for example, 24 months. I am trying to set up a formula in a third column to return last payment date, which in this example would be 12/1/2017.

This appears to be straightforward, however, I was only partially successful in my efforts.

Any help would be appreciated.

Thank you.

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Dec 01, 2015 at 06:22 PM

What version of Webi are you on?

Also, is it always months that you are using?

If you're always using months, then you'd simply want to add n-1 months to your original date.

As of 4.1 SP6, the RelativeDate function has been enhanced to include other time periods than just days.

So, your final payment date would be, assuming that your in months:

=RelativeDate([Start Date];[Term]-1;MonthPeriod)

You could then substitute in WeekPeriod if the term is weeks and create some If logic as required based on your starting data.

The RelativeDate functionality has been restricted to days since it was introduced. The closest approximation that I've got working for adding months that you might want to try was:

=RelativeDate([Start Date]; ([Term]-1)*(365.25/12))

10|10000 characters needed characters exceeded
• Former Member
Posted on Nov 23, 2015 at 08:19 PM

I would try using the RelativeDate Function

ex =RelativeDate([Date Value];([Amoritization Term]/12*365))

The RelativeDate function uses days so you will have to convert. Also, you may need to wrap the amortization term in a ToNumber() function depending on how it is stored.

10|10000 characters needed characters exceeded
• Former Member AMIT KUMAR

When I plugged in =RelativeDate([Scheduled First Payment];730) - with the scenario I mentioned above:

First Payment Date 1/1/2016

Amortization: 360 Months

The value returned is 12/31/17.

I need the value of 12/1/45 to return- which would be the last payment made.

As another example, if the First Payment Date is 1/1/2016 with a 240 month amortization, I would need 12/1/35.

I am not well versed on the various functions at all; not sure what the '730' is doing in your suggestion.

Thanks for the help.

• Former Member
Posted on Dec 01, 2015 at 06:40 PM

The issue is Months are not exact so it will be difficult to get the same day of the month as your first pmt date to return.

This formula works, it's a bit of butchery though.

=ToDate(Concatenation(Concatenation(Concatenation(Concatenation(MonthNumberOfYear(RelativeDate([Scheduled First Payment];([Amortization Term]/12*365.25)));"/");DayNumberOfMonth([Scheduled First Payment]));"/");FormatNumber(Year(RelativeDate([Scheduled First Payment];([Amortization Term]/12*365.25)));"#"));"MM/dd/yyyy")

10|10000 characters needed characters exceeded
• Former Member

Thanks Brandon. When I tried this...it would return the correct value about 50% of the time. I have about 20 different line items that I tested....

For example, had a first payment date of 1/1/16 with a 360 month amort - correct final payment date returned of 12/1/45.

Another had a first payment of 2/1/16 with a 360 amort - correct final payment date returned of 1/1/46.

However, another one had a first payment date of 8/1/13 with a 360 amort - the value generated was 8/1/43; I would have expected 7/1/43.

• Former Member
Posted on Dec 01, 2015 at 08:29 PM

Hi,

try something like this :

[initial date] = Start Date

[period] = Period in months

[end month] = Mod([period];12)

[end year] = Int([period]/12)

End_Date = ToDate([endMonth]+"/"+[end year]";"MM/yyyy), this would be the final result if you´re counting from December of Year 0.

But , as you´re counting from a specific [initial Month] [initial Year], the solution would be :

[final month] = if (([end month]+[initial month]) <=12 ; [end month]+[initial month]; [end month]+[initial month]-12)

[final year] = if (([end month]+[initial month]) <=12 ;[end year] + [initial year];[end year] + [initial year]+1)

The desired date [would be] =ToDate(""+[final month]+"/"+Day([initial date])+"/"+[final year];"MM/dd/yyyy")

Regards,

Rogerio