I need to calculate the sum of t-shirt size’s by component. I have created a calculation to give numerical values to the t-shirt size fields:
-Small = 1
-Medium = 3
-Large = 5
CASE WHEN [Measures].[Issue T-Shirt Estimate] = “Small” THEN 1
WHEN [Measures].[Issue T-Shirt Estimate] = “Medium” THEN 3
WHEN [Measures].[Issue T-Shirt Estimate] = “Large” THEN 5
ELSE 0
END
When I try to sum it by component, it results in 0’s or blanks. T-shirt size is a field on epics, and epics are tagged with components. And I want to see the sum of t-shirt size by component.
I have tried the following with no luck:
1.
SUM(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
[Measures].[T-Shirt Size] > 0),
[Measures].[T-Shirt Size]
)
Try this formula for your calculation in 1.measure:
SUM(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
Not IsEmpty([Measures].[Issue T-Shirt Estimate])
),
CASE WHEN
[Measures].[Issues created]>0
THEN
CASE WHEN [Measures].[Issue T-Shirt Estimate] = "Small" THEN 1
WHEN [Measures].[Issue T-Shirt Estimate] = "Medium" THEN 3
WHEN [Measures].[Issue T-Shirt Estimate] = "Large" THEN 5
ELSE 0
END
END
)
The second approach is implementing a new calculated JS field from eazyBI import options page: New calculated fields.
And don’t forget to add “measure = true” in the addtional advanced settings so you can import this field as measure
Once new field imported as measure you can use the measure “T-shirt size estimate created” which eazyBi will import for you
The calculation works as we hoped and gets us what we need! The only thing is – it is very slow. The report errors out 75% of the time trying to load. Do you have any advice on that? I imagine it would be using the advanced settings, but what would that look like in javascript vs the MDX code calculation you sent above?
We try to avoid using the advanced settings as our team doesn’t have access to it – we have to coordinate time with a jira admin & then they have to add the code to advanced settings for us, so we aren’t able to try and draft it ourselves.