Hi everyone,
I`m trying to calculate the average time between issue creation and when the issue is set to Resolution = Fixed
[measure].[time between creation and fixed]
I have a Calculate Measure that get the time between creation and Resolution = Fixed. If the issue is not fixed, it calculates time between issue creation and Now.
I plan on putting resolution in Page to have only issues which are Fixed or Unresolved.
Case When isEmpty(DateDiffdays( ([Issue].CurrentHierarchyMember.GetDate('Created at')), (CASE WHEN [Resolution].[Resolution].getMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = 'Fixed' THEN [Issue].CurrentHierarchyMember.GetDate('Resolved at') END) )) THEN DateDiffdays( ([Issue].CurrentHierarchyMember.GetDate('Created at')), NOW() ) ELSE DateDiffdays( ([Issue].CurrentHierarchyMember.GetDate('Created at')), (CASE WHEN [Resolution].[Resolution].getMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = 'Fixed' THEN [Issue].CurrentHierarchyMember.GetDate('Resolved at') END) )END
This measure seems to work fine.
[Measure].[Average time between creation and Fixed]
Then I used the previous measure to create my average.
NonZero(
Avg(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
[Measures].[time between creation and Fixed]>0
)
,
[Measures].[time between creation and Fixed]
))
My problem is that no matter what is in Pages or in Row (other than individual issues) I always get the same result for my average
Can someone help me find the error(s) in my measure or reasoning?
Thanks