Create calculated member based on multiple Jira Components

Alan,

The solution to count the issues having several components requires a calculated measure iterating over the issue dimension.

The idea is to use the Count function and filter from the issue set those that have both components. The condition like this need to use the tuples for each component where you combine a measure and the component:

([Measures].[Issues created],
  [Project].[My project].[A])>0

Note that Component is the lower level of the Project dimension and you can reference the component correctly by including the project level in the member description.

The complete formula could look like this:

Nonzero(Count(
  Filter(Descendants(
    [Issue].CurrentMember,[Issue].[Issue]
  ),
  ([Measures].[Issues created],
    [Project].[My project].[A])>0
  AND
  ([Measures].[Issues created],
  [Project].[My project].[B])>0
  ))
)

In the case when you have identical component names across several projects, the solution might need one more step. You need to create the calculated members in the Project dimension to aggregate the components by name (e.g. the component “All A component”):

Aggregate(
  Filter(
    [Project].[Component].Members,
    [Project].CurrentHierarchyMember.Name="A"
  )
)

Now you can use the aggregated members in the calculation:

Nonzero(Count(
  Filter(Descendants(
    [Issue].CurrentMember,[Issue].[Issue]
  ),
  ([Measures].[Issues created],
    [Project].[All A component])>0
  AND
  ([Measures].[Issues created],
  [Project].[All B component])>0
  ))
)

Kindly,
Janis, eazyBI support

1 Like