Count issues with certain transitions

Hello,

I’m trying to figure out how to get issue count which have transitioned “In Testing => Waiting” OR “For Testing => Waiting” based on user who has logged time in the issue. I have “Logged by” and “Issue” as rows and created this custom measure:
Count(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
[Measures].[Hours spent] > 0
AND
(
NOT IsEmpty((
[Measures].[Transitions to status],
[Transition].[In Testing => Waiting]
))
OR
NOT IsEmpty((
[Measures].[Transitions to status],
[Transition].[For Testing => Waiting]
))
)))
If i remove “Logged by” dimension, then i get overall count, but with it i get 0 on every row.
image

It looks like i’m missing something, but can’t figure out what. Maybe someone can point me to right direction with this.
Also next there is needed also to count issues which have transitioned “In Testing => Waiting” OR “For Testing => Waiting” more than once.

Br,
Toomas

Hi @toomastahe

Try using this formula which ignores the Logged by context for the transition validation:

Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
[Measures].[Hours spent] > 0
),
CASE WHEN
Aggregate({
[Transition].[In Testing => Waiting],
[Transition].[For Testing => Waiting]
},
(
[Logged by].Currenthierarchy.DefaultMember,
[Measures].[Transitions to status]
)
)>0
THEN
1
END
)

And this one to count issues that had at least 2 transitions

Sum(
Filter(
Descendants([Issue].Currentmember, [Issue].[Issue]),
[Measures].[Hours spent] > 0
),
CASE WHEN
Aggregate({
[Transition].[In Testing => Waiting],
[Transition].[For Testing => Waiting]
},
(
[Logged by].Currenthierarchy.DefaultMember,
[Measures].[Transitions to status]
)
)>1
THEN
1
END
)

Martins / eazyBI

Thank you @martins.vanags

This was indeed the missing link :slight_smile:

1 Like