CurrentHierarchy
EAZYBI Returns the current dimension hierarchy (e.g. for Time dimension, default, Weekly, or Fiscal) based on the currently used hierarchy.
This function can be useful if the dimension has more than one hierarchy.
Syntax
Dimension_Expression.CurrentHierarchy
Arguments
Dimension_Expression | MDX expression that returns a dimension. |
---|
Examples
This function is rarely used alone without other functions like .Name
, .Level
, or .DefaultMember
Example with Level name
This example returns the value of issues resolved since the beginning of the year (YTD) only for members at the year level.
CASE WHEN [Time].CurrentHierarchy.Level.Name = "Year" THEN CoalesceEmpty([Measures].[YTD issues resolved], 0) END
Example with DefaultMember
This example calculates the percentage of the Issues resolved from a selected or displayed Time period divided by the value of Issues resolved in all periods. To calculate the issues resolved in all periods use the tuple.
[Measures].[Issues resolved] / ([Measures].[Issues resolved], [Time].CurrentHierarchy.DefaultMember)
Don't forget to select the right output format for this calculated measure.