Calculate Median for Workdays in Transition Status

I am trying to calculate Median for Workdays in Transition Status.
I am using the following calculated measure:

Median(CascadingChildrenSet([Issue].CurrentHierarchyMember),
[Measures].[Workdays in transition status])

However Median is displaying the same number as the Workdays in Transition column.
Can you please help.

Hi @jungleranger007!

You are on the right track, but you are not getting the expected result because of the set you are passing to the Median(…) function.

To check the set over which you are doing the calculation you can use the SetToStr(…) function. For example:

SetToStr(
    CascadingChildrenSet([Issue].CurrentHierarchyMember)
)

As a side note, if you have time, here is a presentation from eazyBI community days about MDX debugging: Journeying with an MDX (30min).

I imagine you wish to get a median of all issues that exited the Transition status during the period. The formula then would be as follows, getting all issues with the Descendants(…) function:

Median(Filter(
  Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
  [Measures].[Average workdays in transition status] > 0
  ),
[Measures].[Workdays in transition status])

Lauma / support@eazybi.com