Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Average age of open issues -Workdays only-

CALMAIRE DOOH (CONT)
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 28, 2019

I am pretty new to Eazybi and  trying to put on some reports for my team.

I was able to use the formula below to find the average age of open issues, but what i need is the average age of open issues IN WORKDAYS only and this formula below is giving me workdays and weekends.

It is important to note that, my workday settings are Monday through Friday.

I do not know what to do in order to have a result only in workdays.

Please help

This the formula:

CASE WHEN [Measures].[Open issues] > 0 THEN
Avg(
Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
[Measures].[Open issues] > 0),
CASE WHEN DateInPeriod(Now(), [Time].CurrentHierarchyMember)
THEN DateDiffDays([Issue].CurrentMember.get('Created at'),
Now())
ELSE DateDiffDays([Issue].CurrentMember.get('Created at'),
[Time].CurrentHierarchyMember.NextStartDate)
END
)
END

1 answer

0 votes
Zane eazyBI Support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2019

Hi,

You may slightly modify the formula to apply calculation only for working days according to eazyBI settings excluding weekends and listed holidays. 
Update calculation and use function DateDiffWorkdays() instead of DateDiffDays():

CASE WHEN [Measures].[Open issues] > 0 THEN
  Avg(
    Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
      [Measures].[Open issues] > 0),
    CASE WHEN DateInPeriod(Now(), [Time].CurrentHierarchyMember)
    THEN DateDiffWorkdays([Issue].CurrentMember.get('Created at'),
      Now())
    ELSE DateDiffWorkdays([Issue].CurrentMember.get('Created at'),
      [Time].CurrentHierarchyMember.NextStartDate)
    END
  )
END

 

For more information you may see eazyBI documentation:

 

Best,
Zane / support@eazyBI.com

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events