Hi everyone, here is the context.
Create a report with Time Dimension in Rows, Project and Issue Type in Pages, and Measures in columns.
Select Spike, Story, and Bug for Issue Type and the specific project you wish to target if you have multiple projects in your cube. If you only have one project in your cube then this is unnecessary.
Select the Quarter member in time and “Story Points resolved” and “Issues resolved” in Measures dimension.
Create a custom calculated member that divides “Story Points resolved” by “Issues resolved” to get the average points per issue.
This works just fine, but the calculation includes issues that don’t have story points which skews the numbers. So, I created another custom calculated member to filter out the issues that don’t have story points so that I can get an appropriate count.
Aggregate(
Filter([Issue].[Issue].members,
NOT isEmpty([Measures].[Issue Story Points])
AND DateInPeriod(
[Issue].CurrentMember.getProperty(“Resolved at”),
[Time].CurrentMember
)
)
)
Separately, run the following JQL and note the count of issues returned.
project = “EazyBI project name” AND resolutiondate >= 2018-07-01 AND “Story Points” is NOT EMPTY and issuetype in (Story, Spike, Bug) ORDER BY resolutiondate ASC
That will return the number of resolved stories, spikes, and bugs within the current quarter (Q3 2018).
Compare that number with the number of issues returned for the calculated member and you may notice a discrepancy.
Now, create another custom calculated member where rather than deriving the date range from the Time dimension, you declare it directly.
Sum(
{PreviousPeriods([Time].CurrentHierarchyMember), [Time].CurrentHierarchyMember},
Aggregate(
Filter([Issue].[Issue].members,
NOT isEmpty([Measures].[Issue Story Points])
AND DateBetween([Issue].CurrentMember.getProperty(“Resolved at”),
‘2018-07-01’,
now()
)
)
)
)
You’ll notice that for the Q3 period, it now returns the appropriate number of issues in Q3 that have been resolved that have story points assigned to them.
You can test this by changing the date range as well. Change to the Q2 date range and it’ll show the appropriate aggregation for that date range.
But if you leverage [Time].CurrentHierarchyMember.StartDate, for example, or some other dynamic definition of date range, the calculation ends up wrong.
After digging in, I found that when leveraging the Time dimension declaration, it only calculates issues that were resolved in that particular time declaration AND CREATED in that particular time declaration as well.
In other words, if Issue #1 was created in Q2 but resolved in Q3, using the Time declaration to derive the date bound will cause it to not be counted. However, if you declare the dates directly, Issue #1 will be counted properly.
That is the expected behavior, the same behavior as happens when you do a JQL search.
So, is there something that I’m doing here incorrectly, or is this a bug in how Time dimension context skews custom calculations?
Thanks for any help here!
– Malik Graves-Pryor