PERIODSTODATE
Description:
This function is used to return a set of sibling members from the same level as a given member, starting with the first sibling and ending with the given member, as constrained by a specified level in the Time dimension.
Syntax:
PeriodsToDate( [ Level_Expression [ ,Member_Expression ] ] )
Return type:
SET
Parameters:
Parameter | Description |
|---|---|
Level_Expression | It is a valid MDX expression that returns a set. |
Member_Expression | It is a valid MDX expression that returns a member. |
Example:
WITH MEMBER [Measures].[Running Total] AS
SUM(PeriodsToDate([Date].[Calendar].[Calendar Year], [Date].[Calendar].CurrentMember),
[Measures].[Internet Sales Amount])
SELECT {[Measures].[Internet Sales Amount], [Measures].[Running Total]} ON COLUMNS,
[Date].[Calendar].[Month].Members ON ROWS
FROM [AdventureWorksMF_ValueBased]