How to calculate max days in transition status for both previous transition status and current status

Hi,
We need a report to calculate the issue count which max days in transition status beyond 30 days.
Now I have one function “Max days in transition status” below.
Max(
Descendants([Transition Status].Members, [Transition Status].[Transition Status]),
[Measures].[Days in transition status]
)
And Another function to calculate the issue count which “Max days in transition status” over 30 days.

Count(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
IsEmpty([Issue].CurrentHierarchyMember.get(‘Closed at’))
AND
[Measures].[Issue type] = ‘Change request’
AND
[Measures].[Issue status] <> ‘Done’
AND
[Measures].[Max days in transition status] >= 30
)
)
This issue now is: the function only can count the issues with green mark, but cannot count the issue with red mark as below:

Can you help how to update the function to count both green and red mark.

Thanks.

Hi @Jet,

To retrieve the number of days issues have spent in previous and current statuses, I recommend a calculated measure from our Demo account - Issue days in selected status - Issues - Jira Demo - eazyBI. The calculated measure “Days in transition status till now” is the one you are interested in.

However, I don’t recommend using it to determine the number of issues that are spending more than 30 days in a particular status. The suggested calculated measure already iterates through issues. Using it in your calculation would make eazyBI consider all your issues twice, resulting in poor performance.

You may want to look into defining a JavaScript calculated custom field to determine such information - the issue has spent more than 30 days in any status: JavaScript calculated custom fields.

Best,
Roberts // support@eazybi.com