How to calculate Deployment Frequency based on Fix Version (Current Year Day Number /number of deployments)

Hi @Ionut_Sandu

I am posting a wrap-up of the suggestions from the conversation on our support channel:

To get the Deployment frequency first, try to calculate the number of unique releases each year. To do that, put the Time dimension on rows and select the “Year” level. After that, you can try to create a new calculated member in the Measures dimension with the formula below:

--Release Count
Sum(
  Filter(
    Descendants([Fix Version.By name].CurrentHierarchyMember,[Fix Version.By name].[Name]),
    DateInPeriod(
      [Fix Version.By name].CurrentHierarchyMember.FirstChild.get('Release date'),
      [Time].CurrentHierarchyMember
    )
  ),
  1
)

This will give you the number of unique releases each year, based on the Fix Version release dates. With the FirstChild method you, eliminate the duplicates by fetching the release date of the Version from the first project in the “Fix Version.By name” hierarchy.

I have to note that this will work as expected only when all the involved projects have the same version naming scheme and the same release dates.

To get the number of days each year, please create another calculated member in the Measures dimension:

--Days in Year
CASE WHEN
  Not DateInPeriod(
    Now(),
    [Time].CurrentHierarchyMember
  )
THEN
  DateDiffDays(
    [Time].CurrentHierarchyMember.StartDate,
    [Time].CurrentHierarchyMember.lag(-1).StartDate )
ELSE
  DateDiffDays(
    [Time].CurrentHierarchyMember.StartDate,
    Now()
  )
END

This formula checks if the date for the current day is within the current Time dimension period. If it is not, the number of days in that year are returned. If it is, the number of days passed in the current year is returned.

Finally, you can create a calculated member in the Measures dimension that gets the deployment rate:

CASE WHEN
  [Measures].[Release count] > 0
THEN
  [Measures].[Days in Year]
  /
  [Measures].[Release count]
END

Please have a look at a picture of a sample report below:
Screen-Shot-2019-10-14-at-10-55-34

Please have a look at our documentation page for more information on calculated members in the Measures dimension - https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members/calculated-measures.

Best,
Roberts // eazyBI support

1 Like