Contributor

Time Dimension - date

Hello,

Am trying to make a calendar in Anaplan to plot weekdays and holidays.

Time dimension for the model is "DAY" and I wanted not to type the dates in each days, but to put a formula instead. What would be the formula to return the "date" of the time dimension to the line item. I tried to use "ITEM(TIME)" but it does not return the date but has an error instead. 

 

Sample: If the calendar date in the dimension is Jan 1, 2019, the line item would return 1/1/2019

I attached a screenshot of the calendar module I am working on.

 

Thank you!

18 REPLIES 18
Contributor

Re: Time Dimension - date

HI,

 

If your line item is formatted as text you can use the formula.

 

NAME(ITEM(TIME))

 

EDIT: 

This formula seems to work, there's some interesting behaviour on the day function which needed some work around. 

 

DATE(YEAR(ITEM(Time)), MONTH(ITEM(Time)), VALUE(LEFT(NAME(ITEM(Time)), 1)))

Community Boss

Re: Time Dimension - date

@joshuastockwell @sarah.esguerra 

 

It's much simpler!!!!

 

START() 

 

But, put this, and all other TIme related functions, in a separate module just dimensioned by time and reference it everywhere

 

David

 

 

Highlighted
Contributor

Re: Time Dimension - date

Thank you for the response :) appreciated :)
Contributor

Re: Time Dimension - date

Thank you so much! This helped :)
Certified Master Anaplanner

Re: Time Dimension - date

HI Sara,

I understood, its very painful to do manual entry.

But it is really simple to bring the date in the line item. All you need to do is , make use of DATE function. If you try to write ITEM(TIME) it will work only if the format is time period. But here we are using DATE as a format, so please have a look at below screen shot for refrence.

I agree with @joshuastockwell but at last it should be 2 instead 1 because we do have 2 digits days uptil 31.

Time Dimension date.PNG

 

I hope this really helps and solve your problem :).

 

Thanks,

Kavin.

Contributor

Re: Time Dimension - date

Yes, it makes sense to use 2 instead of 1. Thank you so much! :)
Community Boss

Re: Time Dimension - date

@sarah.esguerra @kavinkumar @joshuastockwell 

 

Not sure if my reply got lost in the mix, but just to re-emphasise, you don't need any complex formula here

 

START() will return the first day of the time period

END() will return the last day

 

It's as simple as that

David

Certified Master Anaplanner

Re: Time Dimension - date

 
Community Boss

Re: Time Dimension - date

@kavinkumar ,

 

From the original attachment, I believe the data was at the day level, thus start() would work great.

 

Thanks,

 

Rob