Hi,
I’m looking to know:
Amongst issues now fixed, how many were less then 30 days at the time they were set to Fixed Resolution
I can calculate the age of an issue at the time it was fixed with this:
DateDiffdays(
([Issue].CurrentHierarchyMember.GetDate('Created at')),
(CASE WHEN [Resolution].[Resolution].getMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = 'Fixed'
THEN [Issue].CurrentHierarchyMember.GetDate('Resolved at')
END))
I then used a CASE WHEN to give a value of 1 to issues that are less then 30 days old and 0 to the rest. The goal being to sum them afterwards:
Case When
--Time between creation and fixed
DateDiffdays(
([Issue].CurrentHierarchyMember.GetDate('Created at')),
(CASE WHEN [Resolution].[Resolution].getMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = 'Fixed'
THEN [Issue].CurrentHierarchyMember.GetDate('Resolved at')
END)
-- time range before fix
)<30
THEN 1
else 0
END
If I use the TOTAL function on measure, it doesn’t sum all the 0 and 1s.
Also, this formula is not functional
Sum({
Case When
--Time between creation and fixed
DateDiffdays(
([Issue].CurrentHierarchyMember.GetDate('Created at')),
(CASE WHEN [Resolution].[Resolution].getMemberNameByKey([Issue].CurrentHierarchyMember.get('Resolution ID')) = 'Fixed'
THEN [Issue].CurrentHierarchyMember.GetDate('Resolved at')
END)
-- time range before fix
)<30
THEN 1
else 0
END
})
On this example, I would like the 1st row to show the total number of issues that are less then 30 days old at time they were Fixed (=1 in my CASE WHEN)
Thanks,