# Measure number of ticket in backlog status for 2 days

We have a KPI on how long we expect a ticket to be in the backlog status.
Let’s say that KPI would be 2 workdays. I would like to know the percentage of tickets that we successfully picked up before the 2 workdays KPI.

I would think I need to get the number of total tickets with a transition status from backlog and the number of transition status from backlog below 2 days.
With those two numbers, I could do a percentage calculation.

Your thinking is correct. You can determine the number of issues transitioned out of the status “Backlog” within two days with a calculated measure that iterates through all issues. See the formula below:

``````Sum(
Filter(
Descendants([Issue].CurrentMember,[Issue].[Issue]),
-- Issue first transitoned out of Backlog in the current Time dimension period
DateInPeriod(
([Measures].[Transition from status first date],
[Transition Status].[Backlog],
[Time].CurrentHierarchy.DefaultMember),
[Time].CurrentHierarchyMember
)
AND
-- the time it took the issue to transition out of Backlog is equal or less than two workdays
DateDiffWorkdays(
([Measures].[Transition to status first date],
[Transition Status].[Backlog],
[Time].CurrentHierarchy.DefaultMember),
([Measures].[Transition from status first date],
[Transition Status].[Backlog],
[Time].CurrentHierarchy.DefaultMember)
) <= 2
),([Measures].[Transitions from status],[Transition Status].[Backlog])
)
``````

See the picture below on how it would look in a report:

For the KPI calculation, I used the following formula:

``````CASE WHEN [Measures].[Issues Transitioned from Backlog] > 0
THEN
[Measures].[Issues Transitioned from Backlog <= 2 workdays]
/
[Measures].[Issues Transitioned from Backlog]
END
``````

Look at the eazyBI documentation page for more information on defining calculated measures -​https://docs.eazybi.com/eazybijira/analyze-and-visualize/calculated-measures-and-members.

Best,
Roberts // support@eazybi.com