DateMember
EAZYBI Finds the Time dimension hierarchy level member from the date
Syntax
Time_Level_Expression.DateMember('Date')
Arguments
Time_Level_Expression | MDX expression that returns Time dimension level. |
---|---|
Date | MDX expression that returns a date |
Examples
[Time].[Month].Datemember('Jan 10 2021')
returns Jan 2021 based on the provided calendar date. Will work with the default hierarchy from Time dimension.
[Time].[Month].Datemember('Jan 15 2021')
returns Jan 2021 based on the provided calendar date. Will work with the default hierarchy from Time dimension.
[Time].[Month].Datemember([Measures].[Imported cf date])
returns the month for particular imported date value.
[Time].[Day].Datemember('Jan 15 2021')
returns Jan 15, 2021 based on the provided date
[Time].Currenthierarchy.Levels("Day").Datemember('Jan 15 2021')
returns Jan 15, 2021 based on the provided date. Will work with any hierarchy from Time dimension, as long as it has level name "Day"
[Time].[Year].Datemember('Jan 20 2021')
returns the year 2021 based on the provided date
Can be used with another function when creating a measure (with correct output format) to return the start date of the period (defined in the level) of the member that is found by DateMember function
[Time].[Month].DateMember('Jan 10 2021').Startdate
This example will return the Jan 1, 2021
You can check DateMember used in our demo reports:
- Cumulative flow diagram for selected period where DateMember is used in the calculated measure "Cumulative flow"
- Story points burn-down by sprints for epic - in calculated measure "Work resolved in sprint"
- Version releases - Datemember is used in calculated measures "Open issues in version at release date" and "Resolved issues in version at release date"
See also
- Function CurrentDateMember
- Function Startdate