Calculate monthly of the user defined calculation?

Hello created a user defined calculation, that calculates % of “story-points spent on fixing bugs / total story-points closed in month”, and created a monthly report, per project. I called if Technical Debt. So far so good. Now, for total (for all projects) I need to have it calculated as Average (Technical Debt) of all projects, and not as “Sum all bug’s SPs / sum All SPs”, as value of story-point varies from project to project.
Can you please suggest how can I change calculation for All Projects to Average (Technical Debt)? if this is not possible other options would be helpful.

Thanks!

Hi @Max_Herman

Yes, it indeed seems so far, so good.
Now, you may want to add CASE WHEN construction to calculate the average value for Project dimension Default member while keeping the original Technical Debt calculation on a project level:

CASE WHEN
[Project].CurrentHierarchyMember is [Project].CurrentHierarchy.DefaultMember
THEN
Avg(
  Filter(
    Descendants([Project].CurrentHierarchyMember, [Project].[Project]),
    [Measures].[Technical Debt]>0
  ),
  [Measures].[Technical Debt]
)
ELSE
[Measures].[Technical Debt]
END 

Ensure the measure name technical Debt is correctly typed in the formula and remember to set formatting (integer %).

Best,

Ilze / support@eazybi.com