Duration between two date fields

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

1 Like