Time management

The Time dimension is a mandatory dimension for each TGKML script. Tagetik provides the user with a set of functions which allow to move along the "time" axis (scenario/period) while working on data present on different scenarios/periods.

The Time dimension can be navigated as follows:

Syntax Description
Time.Prev Previous period
Time.Next Following period
Time.Lag(N) N periods backward. N can be also a negative number and, in this case, the move is forward Example: Time.Lag(3) means third period before the current one
Time.Lead(N) N periods forward. N can be also a negative number and, in this case, the move is backward Example: Time.Lead(3) means third period after the current one
Time.Scenario sum of all the Periods of the current Scenario (the one the current period belongs to)
Time.PN Where N is an integer. Sum of a group of periods (P3=three months; P2=two months; P4=four month) Example: Time.P3 sum of the amounts of the three months related to the current scenario
Time.Scenario.Prev Previous Scenario
Time.Scenario.Next Following Scenario
Time.Scenario.First First period of the current scenario
Time.Scenario.Last Last period of the current scenario
Time.Scenario.Prev.Last Last period of the scenario before the current scenario
Time.Scenario.Last(P3) Last four months on the current scenario
Time.Scenario.Period(N) With N = 1,..,maxPeriod Period N of the current scenario
Time.Scenario.First(P3).Last Last period of the first four months of the current scenario
Time.Ref(N) With N = 1,..,5 Reference scenario N related to the current scenario
Time.[scenario_code] Sum of all the periods of a specific scenario Example: Time.[2013BDG] = sum of all the periods of the scenario 2013BDG
Time.[scenario_code period_code]

Moreover it is possible to specify a time range using the following syntaxes

Syntax Description
Time.ToDate All the periods <= of the current period
Time.ToDate(P3) All the periods<= of the current period of the current four month
Time.P3.ToDate All the four months of the current scenario<= of the current four month
Time.Span(1) Current period and previous period
Time.P3.Span(1) Current and previous for month

The above mentioned features for the Time dimension have to be used in an assignment as follows:

[LO].[X0000] := [C00000](Dest1.Filter([01|D11]), Time.Scenario.Prev);

[LO].[X0000] := [C00000](Dest1.Filter([01|D12]), Time.Scenario.Ref(3));

When it is needed to read, within an assignment, the current period from a scenario which is not the current one, the "ParallelPeriod" function has to be used.

For example, if the current period is 3, using the syntax

… := [C00000](Dest1.Filter(01|D11), Time.ParallelPeriod(Scenario.Prev));

the system reads from the same period (3) of the previous scenario.

The system reads from the same period (3) of the previous scenario, whereas by using the syntax

… := [C00000](Dest1.Filter(01|D11), Time.ParallelPeriod(Scenario.[2015ACT]));

the system reads data from the same period (3) of the scenario 2015ACT.