I've created an opportunity, revenue, account, accountplan dataset. On the opportunity is a highly complex revenue logic so we decided to have a revenue field for each month. To get all those objects together I'm computing for all records following fields: Parent(Id), Id, Revenue, Date, Line (means forecast, actuals or plan). To create those fields for e.g. one opportunity (who is open and has the close date in the current fiskal year= calender year) I need to create one record for each month. At the moment I'm doing this with a compute expression: toDate("2017-05-31", "yyyy-MM-dd"). The thing is, that for next year I need it to be end of may 2018, the other year end of may 2019... does anyone has an idea how to accomplish this?

Thanks!!! Anna

1 Answer 1


Hope this helps I think you are trying to get year current year in your date you can use this line

toDate(toString(now(), "yyyy")+"-05-31", "yyyy-MM-dd")

Results in 2017-05-31

if you want to have next year then you can use this line

toDate(toString(toDate(date_to_epoch(year_last_day(now()))+86400), "yyyy")+"-05-31", "yyyy-MM-dd")

Results in 2018-05-31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .