How to count or list all bugs with different set of conditions

I was trying this but no success
Aggregate({
Filter([Issue].[Issue].Members,
[Measures].[Issue type]= “Bug”
and
(([Measures].[Issue labels]=“QA_Prod” and [Measures].[Transitions to status]=“Sign-off”)
or
([Measures].[Issue labels]=“QA_Sandbox” and [Measures].[Transitions to status]=“Done”)
)
)
})

I have bugs with two type of labels (QA_prod and QA_Sandbox) and these bugs goes to different transition status

  • QA_Prod goes to Sign-off
  • QA_Sandbox goes to Done

I was trying to count or list these bugs in same table but i am getting no Luck. Anyone please help here.

Hi @Deepak,

Suppose the two bugs indeed don’t mix. Then, you can define a calculated measure that adds the number of issues transitioned to the respective statuses. The formula could look similar to the one below:

([Measures].[Transitions to status issues count],
[Transition Status].[Sign-off],
[Label].[QA_Prod],
[Issue Type].[Bug])
+
([Measures].[Transitions to status issues count],
[Transition Status].[Done],
[Label].[QA_Sandbox],
[Issue Type].[Bug])

The formula you shared utilizes aspects I don’t recommend. For example, if you wanted to retrieve a list of Issue dimension members and used the formula in the Issue dimension, then using another dimension (Measures) members is not recommended. Also, “Issue” level aggregations in the Issue dimension can significantly impact the report performance.

The conditions for the measures “Transitions to status” also pose a problem. The measure returns a numeric value - the number of transitions. Thus the value compared to a string will always be FALSE.

In calculated measures, when you need to iterate through individual issues and apply multiple conditions to filter the desired results, please use the Descendants() function instead of [Issue].[Issue].Members. Please see more details on defining calculated measures on the eazyBI documentation page - Calculated measures. And some info on Descendants() - Descendants.

Best,
Roberts // support@eazybi.com

@roberts.cacus Thank you for the guidence and help.

Could you please help here how to write above using Descendants()
Thanks I tried creating below but its not working with time filter
NonZero(Count(
Filter(Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
[Measures].[Issue type]=“Bug”
AND
(
([Measures].[Transitions to status issues count],[Transition Status].[Sign-off],[Label].[QA_Prod])>0
OR
([Measures].[Transitions to status issues count],[Transition Status].[Done],[Label].[QA_Sandbox])>0
)

  )
))

@roberts.cacus could you please help above?

Hi @Deepak,

Please provide more details on how the descendants calculation doesn’t work with the time filter. It should allocate issues to the periods transitioned to the respective statuses. Please share a screenshot of the report or its definition - Create reports.

Best,
Roberts // support@eazybi.com