Duration between two date fields

Hello all, we have a jira project where issue type story have several date fields. We want to find average number of workdays between two date fields for all the stories in the project. I have used the below formula to get the number of workdays between two date fields. This works for individual issues but I’m struggling to generate a report of average workdays for all the issues in the project.

DateDiffWorkdays([Measures].[Issue Date of Request],
    [Measures].[Issue Prep complete date])

Any help is appreciated.

I was able to solve this by using following formula:

This helped me to get consolidated count for different dimensions.

Hi @Sarath,

I am happy you found a similar solution on the community forum and adjusted it to your use case.

You can also achieve the average calculation with the Avg() function. The formula could look similar to the one below:

Avg(
  Filter(Descendants([Issue].CurrentMember,[Issue].[Issue]),
    Not IsEmpty([Issue].CurrentMember.Getdate('Date of Request'))
    AND
    Not IsEmpty([Issue].CurrentMember.GetDate('Prep complete date'))
    AND
    [Measures].[Issues with Prep complete date]>0
  ),
  DateDiffWorkdays(
    [Issue].CurrentMember.Getdate('Date of Request'),
    [Issue].CurrentMember.GetDate('Prep complete date')
  )    
)

Best,
Roberts // support@eazybi.com