Adding 2 measures and not showing duplicate results

Hi @vanessa,

When adding two measures, there might be duplicating issues if an issue matches both criteria (an issue has comment created AND comment resolved).
As those criteria are not related, four combinations are possible. To validate all those combinations and avoid duplicates, you might want to iterate through issues and check both conditions (comment created and comment resolved) for each issue. For the calculated measure, you might want to use functions Count(), Filter(), and Descendants():

For example, to count unique issues that have both, comment created AND comment resolved, the formula might look like this:

Count(
  Filter(
    --go through individual issues
    Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
    --for each issue validate both criteria
    [Measures].[Issues comment created] > 0 AND
    [Measures].[Issues comment resolved] > 0
  )
)

Another example, to count unique issues that have either, comment created OR comment resolved, the formula might look like this:

Count(
  Filter(
    --go through individual issues
    Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
    --for each issue validate both criteria
    [Measures].[Issues comment created] > 0 OR
    [Measures].[Issues comment resolved] > 0
  )
)

More details on those concepts how to filter issues by several criteria are also covered in the presentation: “Translating JQL Queries to eazyBI Reports”: eazyBI Community Days, Day-2 Training Presentations

Please see also the documentation on the main concepts of calculated measures:

Best,
Zane / support@eazyBI.com

1 Like