Returns a set of single-member tuples from a specified layer up to a given member in that layer (or up to the default member), or, returns members up to the current member of the Time dimension.
Syntax
PeriodsToDate ( [layer [, member [, hierarchy ]]] )
Parameter | Description |
---|---|
The layer to use as a beginning point. | |
The member to use as an ending point. | |
Optional. A specific hierarchy within the time dimension. |
Notes
If layer and member are present, this function determines the ANCESTOR of member, computed as Ancestor(member, layer).
Consider the subtree rooted at the ANCESTOR. This function returns the set of all members along the same generation between the first descendant of ANCESTOR at input member's generation and the input member (inclusive of both.)
The return value of this function is the set of single-member tuples constructed from the members in the subtree rooted at ANCESTOR which are in the same layer as member and which are at or before the position of member within its layer. The order of tuples in the returned set is the same as the order of the members included in the input layer.
If layer is present and member is absent, member is considered to be CurrentMember of the dimension that layer is associated with.
If layer and member are both absent, member is considered to be the current member of the Time dimension, and layer is assumed to be the generation of the member's parent. Hence the return value is a set containing the left siblings of member and member itself.
Using Periodstodate(layer, member) has the same effect as using the following nested functions:
MemberRange( OpeningPeriod( member.GENERATION, Ancestor (member, layer) ) : member )
Example
PeriodsToDate (Year.Generations(1), May) returns the set:
{ Jan, Feb, Mar, Apr, May }
PeriodsToDate (Year.Generations(2), May) returns the set:
{ Apr, May }
PeriodsToDate (Year.Generations(3), May) returns the set:
{ May }
See Also