Filtering tickets based on 2 components

Hi, I am trying to calculate the time spent for tickets with specific components.

Individually calculating the time spent per component is easy but when I try to aggregate the time spent on tickets that have Component A, B or A and B I’m getting duplicates.

In short I have:

  • Task 1 (Component A) Time Spent 1 hr
  • Task 2 (Component B) Time Spent 1 hr
  • Task 3 (Component A and B) Time Spent 1 hr

I expect the aggregate result to be 3 hrs
but instead I am getting 4hrs

This is the Calculated Member Formula I am using in the Project dimension

Count(Filter(
  [Project].[Component].Members, 
  [Project].CurrentMember.name MATCHES 'Component A'
  OR
  [Project].CurrentMember.name MATCHES 'Component B'
))

Any help is appreciated :slight_smile: