Calculated Member in the measure dimension for Average Resolution

I’m fairly new to EazyBI and really struggling on a Calculated Member in the measure dimension.
I’m trying to get the Average Resolution time for a set if issues that were closed in 3 different time periods (last week, current month, current year).
It seems that I can get an average of all resolved issues, or an average of some other set (I have no idea) but none of them match the pages and Rows I have setup with the Measure “Issues resolved”.

Any help would be greatly appreciated

.

My calculated measure within the “Measure” dimension currently returns an out of memory error:
Avg(
Filter(Descendants([Issue].CurrentMember,[Issue].[Issue]),
[Measures].[Issue status] = “Closed”
AND
[Measures].[Issues resolved] > 0
),
Round(DateDiffMinutes(
[Issue].[Issue].CurrentHierarchyMember.GetProperty(‘Created at’),
[Issue].[Issue].CurrentHierarchyMember.GetProperty(‘Closed at’)
))
)

We also setup an advanced setting to return seconds (This isn’t a requirement for my use case):
[jira.customfield_res_sec]
name=“Resolution seconds”
data_type=“integer”
measure=true
multiple_dates=true
javascript_code=’’’
var datefrom=issue.fields.created;
var dateto=issue.fields.resolutiondate;
if (dateto) {
var duration = (Date.parse(dateto) - Date.parse(datefrom)) / 1000;
issue.fields.customfield_res_sec=dateto.toString().substr(0,10) + “,” + duration;
}
‘’’
And then tried to setup a calculated measure for my Average Resolution as follows but it doesn’t return an average of the time period selected when I “drill through Issue” it’ll return all the issues instead of the number in the “Issues Resolved” column.
CASE WHEN
[Measures].[Issues resolved]>0
THEN
([Measures].[Resolution seconds]
/
[Measures].[Issues resolved])/60
END

Hi,

The custom Javascript calculation with the multiple_dates option is vulnerable to the timezone settings in the data import options:

If you use another setting than “Server time zone” all the dates are converted to the selected timezone. Note that the script you are using eliminates the timezone part from the time string which might break the result during the conversion. The Javascript code needs adjustments to avoid the impacts of such conversion.

Kindly,