Aggregate 2 average days issue type in 1

Hi EazyBi Community!
I’m trying to show the average days from the status “under investigation” until “close” for issue type “Investigation” + having average days from the status “in progress” to “Done” for subtasks type aggregate in 1.

Here is my code for investigation:

CASE WHEN
(
[Measures].[Transitions to status],
[Transition Status].[Closed]
) > 0
THEN
AVG(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
(
[Measures].[Transitions to status],
[Transition Status].[Closed]
) > 0
),
DateDiffDays(
(
[Measures].[Transition to status first date],
[Transition Status].[Under investigation],
[Time].CurrentHierarchy.DefaultMember
),
(
[Measures].[Transition to status last date],
[Transition Status].[Closed]
)
)
)
END

Here is my code for subtask:

CASE WHEN
(
[Measures].[Transitions to status],
[Transition Status].[Done]
) > 0
THEN
AVG(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
(
[Measures].[Transitions to status],
[Transition Status].[Done]
) > 0
),
DateDiffDays(
(
[Measures].[Transition to status first date],
[Transition Status].[In Progress],
[Time].CurrentHierarchy.DefaultMember
),
(
[Measures].[Transition to status last date],
[Transition Status].[Done]
)
)
)
END

  • How can I aggregate both in 1 column? (I tried to use “OR” and put End 2 times at the end but I got an error)

Thanks!

Hello @Staife

I assume your 2 calculated measures are numeric (“average days”). Just create a new measure and add them!
Something like this:
[Measures].[Issues created] + [Measures].[Issues resolved]

Hope it helps!
VasileS.

2 Likes