# Unique Count of Issue Priority Transition

Hi - trying to get a count each month of the number of “escalation” issues we have, which we define as issues that have been set to (not necessarily created with) a priority of Critical or Blocker. This function is returning a count > 1 per issue. Can you please advise how to get a unique count (1) per issue in MDX?

``````Aggregate({
[Priority].[Critical - Do ASAP],[Priority].[Blocker - Do NOW]},
[Measures].[Transitions to]
)
``````

Thanks,
Ben

Hi Ben,

There is another useful measure for counting the issues having transitions in a field:
[Measures].[Transitions to issues count] for counting the distint issues having the transitions.

This formula should also use the specific transitions field to count only on the chantes in the Priority:

``````Aggregate(
{[Priority].[Critical - Do ASAP],[Priority].[Blocker - Do NOW]},
([Measures].[Transitions to issues count],
[Transition Field].[Priority])
)
``````

Kindly,
Janis, eazyBI support

That looks much better, thank you.

Hello both of you

Taking advantage of this thread I would like to go one step further. Would it be possible to differentiate whether the priority change has been upward or downward?

And another thing ¿This formula will count as a change of priority an issue that has no priority and then becomes a priority (any)?

([Measures].[Transitions to issues count] , [Transition Field].[Priority]))

If so would there be a way to indicate that the counter would only increase in case of going from one priority to another? not from none to having one.

Thanks a lot in advance

Hi,

Such a use case seems possible with a custom formula. However, separate formulas need to be created for each priority transition you wish to find. Here is an example to count issues transitioned from Medium to High priority:

``````NonZero(Count(
Filter(Descendants([Issue].CurrentMember,[Issue].[Issue]),
([Measures].[Transition to first timestamp],
[Transition Field].[Priority],
[Priority].[High])=
([Measures].[Transition from first timestamp],
[Transition Field].[Priority],
[Priority].[Medium]
)
)
))
``````

The idea of the formula is to compare the Transition timestamps if the transition from Medium priority is with the same timestamp as transition to High. That means the specific transition happened.

Kindly,
Janis, eazyBI support

Hi Janis,

Thank you very much for your support. It has been very helpful.

Kindly,
Javier