My report runs sometimes, but most of the times it runs out of memory and times out.
We have an Issue Type called “punch List. With several customer fields. These are the relevant ones here:
- PL Severity Level (Independent form the Severity field)
 - PL Report Date
 
I want to be able to run the following report of the Average ticket Age, viewed by PL Severity:
So I created the following Calculated Members:
“Punch List” type tickets that are open:
[Measures].[Punch List Active Issues]
(
[Measures].[Open issues],[Issue Type].[Punch List]
)
Age of the ticket. If “PL Report Date” is blank, then use the Created Date:
[Measures].[Age - from Report date]
CASE WHEN IsEmpty([Measures].[Issue PL Report Date])
     THEN DateDiffDays([Measures].[Issue created date],now())
ELSE DateDiffDays([Measures].[Issue PL Report Date],now())
END
Calculate the Average Age:
[Measures].[Average Age - from Report Date]
Avg(
  Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
    [Measures].[Punch List Active Issues]>0
  ),
[Measures].[Age - from Report date]
)
As mentioned above, the report crashes most of the time, as it needs to gather and calculate data from all ticket.
How can I optimize it?
Thank you,
