Convert Date with Week Format to Last day of month with a Date Format

Highlighted
Contributor

Convert Date with Week Format to Last day of month with a Date Format

Hi,

 

My model's Model Calendar - Calendar Type is set to 'Weeks: General'. I have a module with a column of dates and the Format is set to Week. 

 

In another column with Format set to Date, I'd like to write a formula that will take the date from above, lets say it's 9/2/2019, and output as the last day of the month in date format, so -  9/30/2019.

 

In Excel, I would just use =EOMONTH(9/2/2019) to get 9/30/2019, but the time dimension of Anaplan is limiting in this way.

 

Is writing a formula like this possible since my model calendar is set to Weeks: General and the date I'm pulling from has a format of Week?

 

Thanks in advance,

3 REPLIES 3
Highlighted
Community Boss

Re: Convert Date with Week Format to Last day of month with a Date Format

Hi,

 

it would be easier with a monthly calendar but we it still easy achievable  with the DAYSINMONTH formula

 

You can do like this:

end of months from weeks.png

(the first screenshot is by days but it is the same with weeks as below)

 

end of months from weeks blueprint.png


Nathan Rudman, Anaplan Model Builder
Highlighted
Contributor

Re: Convert Date with Week Format to Last day of month with a Date Format

Thanks Nathan, this worked for me!
Highlighted
Community Boss

Re: Convert Date with Week Format to Last day of month with a Date Format

do you know this page ?
https://help.anaplan.com/anapedia/Content/Calculation_Functions/CF_All_Functions.htm?cshid=1550
quite useful to find what you need

Nathan Rudman, Anaplan Model Builder