Need help with MDX

I want to create a new calculated measure in easybi such that:
#1 It does summation of the story points of all EPICs under an initiative
#2 Does summation of all story points of only completed EPICs under the initiative
#3 It then divides the value we get in #2 with #1 and should shows result in percentage.

PS-

  1. This calculation should be done only at Initiative level, the cells corresponding to the Epics and Stories should remain blank under this calculated measure.
  2. Story Points assigned to stories shouldn’t be considered

@zane.baranovska May i request help on this?

Hi @Still_Figuring

For this, you’ll need to define a new custom hierarchy in the Issues dimension to have the Initiative > Epic > etc… hierarchy available in eazyBI as well.
https://docs.eazybi.com/eazybi/data-import/data-from-jira/advanced-data-import-options/additional-issue-hierarchies

When you have the hierarchy set up, you can select the Issue dimension in Rows and select the Initiative level to show the Initiatives in rows.

For measure #1, use this formula:

CASE WHEN
[Issue].CurrentHierarchyMember.Level.Name = "Initiative"
THEN
Sum(
  ChildrenSet(
    [Issue].CurrentHierarchyMember
  ),
  (
    [Measures].[Story Points created],
    [Issue Type].[Epic]
  )
)
END

For measure #2 this formula (it will check if the Epic is in one of the statuses that are in the status category “Done” in your Jira):

CASE WHEN
[Issue].CurrentHierarchyMember.Level.Name = "Initiative"
THEN
Sum(
  ChildrenSet(
    [Issue].CurrentHierarchyMember
  ),
  (
    [Measures].[Story Points created],
    [Issue Type].[Epic],
    [Status.Category].[Done]
  )
)
END

Measure #3:

[Measures].[Measure#2]
/
[Measures].[Measure#1]

And choose the Formatting → Percentage.

Let me know if this works as expected!
​Best regards,
​Nauris

@nauris.malitis Here is what i did:

  1. I set up an Advanced Roadmap as:

  2. I selected Initiative from Roadmap

  3. I created Measure1(formatting as integer), Measure2(formatting as integer) & Measure3(formatting as integer percentage) with the MDX Code you provided in your last reply.

  4. I then imported Measure1, Measure2 & Measure3 in my report

Alas ! I am not getting any data under Measure1, Measure2 & Measure3 column in my report.

@nauris.malitis what am i doing wrong?

I can export and share definition of the report if you can provide me your email id.

Hi @Still_Figuring

The code that @nauris.malitis shared works for scenario if story points are entered directly at the epic level in Jira project, which can be the case.

In some other scenarios, the story point value is entered at the story level, and then a different approach is required to calculate results in eazyBI reports.

In this scenario, you would need to import linked field dimensions - “Epic issuetype”, “Epic Status” and “Epic Label” - to calculate results from children of the epic filtered by epic issuetype and epic status and show them against the Epic label in the report.
https://docs.eazybi.com/eazybi/data-import/data-from-jira/advanced-data-import-options/issue-link-field-dimensions

If you need more help defining linked field dimensions, please reach out to support@eazybi.com

Martins / eazyBI