Measure to calculate first release of an Epic from child stories

Hi,
I have a calculated field which at import gets the first time a user story was released from the fix version or a when a linked ‘change request’ issue was set to completed.

I now wish to create a measure which uses this to find the first time an epic was released, with the assumption that the release date of the first child user story is this date.

Order(
  Filter(
    Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
    [Measures].[Issue Type] <> "Epic"
    AND
    [Measures].[Issue Epic Link] = [Issue].CurrentMember.Key
    AND
    Not IsEmpty([Measures].[Issue Fix Version Release Date])
  ),
  [Measures].[Issue Fix Version Release Date],
  BASC
).Item(0).GetProperty('Fix Version Release Date')

This measure is always returning empty, is there anything obviously wrong with it?

Thank you.

Hi @mfagan,

You are heading into right direction; the calculation is almost completed.
You might want to iterate through each epic’s child issues, instead of all issues. use function GetMemberByKey to find Epic Link in the Issue dimension Epic hierarchy.

Order(
  Filter(
    --set of Epic child issues
    [Issue.Epic].[Epic].GetMemberByKey(
      [Epic Link].CurrentMember.KEY
    ).Children,
    --check that child issue has date field
    NOT IsEmpty([Measures].[Issue Fix Version Release Date])
  ),
  --order chid issue by version release dat
  [Measures].[Issue Fix Version Release Date],
  BASC
--return the first (oldest) release date
).Item(0).Get('Fix Version Release Date')

Best,
Zane / support@eazyBI.com