How to get Start Period of Time Range?

Highlighted
Occasional Contributor

How to get Start Period of Time Range?

Hi experts,

 

Is there a way to get start period of a time range in a LineItem?

 

Regards,

Inoue

6 REPLIES 6
Highlighted
Frequent Contributor

Re: How to get Start Period of Time Range?

@Tsuyoshi_Inoue 

 

Use Period(start())  in your month formatted line item , time range dimension-ed module.

Similarly, you can check other functions like Currentperiodstart() and end() with respect to your requirement.

 

https://help.anaplan.com/anapedia/Content/Calculation_Functions/All/START.html

 

 

~Abhi

Highlighted
Master Anaplanner/Community Boss

Re: How to get Start Period of Time Range?

Hi Abhi,

Just the START formula would not work. Because when it is dimensioned against month it will return that particular month itself instead of the beginning of the time range.....

Regards,
Anirudh
Highlighted
Master Anaplanner/Community Boss

Re: How to get Start Period of Time Range?

Hi @Tsuyoshi_Inoue 

 

Create a number formatted line item called Cumulate with the formula:

 

CUMULATE(1)

 

Then create a day/week/month formatted line item called First period with the formula

 

IF Cumulate = 1 THEN ITEM(Time) ELSE PREVIOUS(First period)

 

Set the summary of this line item to MIN if required

 

Result

 

anirudh_0-1595219939219.png

 

Let me know if this works

 

Regards,

Anirudh

 

Highlighted
Valued Contributor

Re: How to get Start Period of Time Range?

Hi @Tsuyoshi_Inoue 

 

To get the very first period in the model time range use

OFFSET(1,-1,0) =0

will return TRUE only at the first time period  of the model time range 

Einas
"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Highlighted
Regular Contributor

Re: How to get Start Period of Time Range?

The simplest way to achieve this is to create a time properties model set with year time period.

Create a single line item dimensioned by time period month

Use the following formula - Period(start())

This will generate the first time period of the year which you can then pull into your target modules.

The targets will need to be time dimensioned and will require the following formula

YEARVALUE(Time Properties Year.First Period)

This is the simplest way to reference first period for any given year.

 

Highlighted
Master Anaplanner/Community Boss

Re: How to get Start Period of Time Range?

@Tsuyoshi_Inoue 

 

Period(start()) is the way to go as others have said, but also change the summary to First Non Blank.

 

First, make sure Total of All is turned on in your Time Range.

 

2020-07-20_07-30-59.png

 

Create a SYS Time Filter module using the Time Range, in my case FY18.  Create a line item with Period(start()) with a format of Time Period (month) if you are using month.  Next, change the summary to First non-blank.

 

2020-07-20_07-31-58.png

 

2020-07-20_07-32-21.png

for a result of:

2020-07-20_07-32-31.png

 

 Now, you can get the final solution in a line item using a Select statement which is ok because it is structural data.

 

2020-07-20_07-40-50.png

 

Hope this helps,

 

Rob