Create calculated member based on multiple Jira Components

As an Example, I have an Issue which can have multiple Component attributes; Say A, B, C, D etc.

I can easily create Calculated Issue Types where Issue has a specific Component e.g. ([Issue Type], [Component].[A])

What I am struggling on (I hope this is just me being a novice) is to select / group for Issue Types that have TWO (or maybe more) Components

e.g. Where there is a Component = A AND a Component = B for the Issue.

What is the method that I should be using to achieve this ?

Thank you all in advance

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