# Calculate Cumulative Sum only for the rows of a Particular Issue

**URL:** <https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270>\
**Category:** Questions & Answers\
**Tags:** jira-reports, report-specific, calculatedmembers, mdx\
**Created:** [November 11, 2021, 12:51pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270 "2021-11-11T12:51:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumen\_jana](https://community.eazybi.com/user_avatar/community.eazybi.com/soumen_jana/32/5385_2.png) [@soumen\_jana](https://community.eazybi.com/u/soumen_jana)\
**Post date:** [November 11, 2021, 12:51pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/1 "2021-11-11T12:51:21Z")

</div>

Hi All,

I need to find the cumulative sum of of my column - Avg Workdays in Transition for each issue.

I have a report say as follows :  
 ![image](https://community.eazybi.com/uploads/default/original/2X/7/71dcaf04358684b815649be8f87c3a8884a766be.png)

I have the constraints as follows:  
1.Each Issue may not have all the transitions. So, the rows vary, as you can see in the picture. e.g. Issue A has 3 transitions , but Issue D can have 2, even Issue E has 1. It can happen.

Q1. How to find the cumulative sum for each issue , like mentioned in the picture.

Q2. How to find the cumulative sum and only show it in the last column for that issue, like the column **Cumulative Final Sum**

Please help.

Regards,  
Soumen

---

<div class="post-metadata">

**Author:** ![martins.vanags](https://community.eazybi.com/user_avatar/community.eazybi.com/martins.vanags/32/8905_2.png) [@martins.vanags](https://community.eazybi.com/u/martins.vanags)\
**Post date:** [November 24, 2021, 1:39pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/2 "2021-11-24T13:39:53Z")

</div>

Hi,

Try creating a new calculated measure (with integer formatting) using this formula

```auto
CASE WHEN
[Measures].[Workdays in transition status]>0
THEN
  Sum(
  Head(
      Order(
      Filter(
      [Transition].[Transition].Members,
      [Measures].[Workdays in transition status]>0
      ),
      [Transition].CurrentMember.key,
      BASC
      ),
    Rank(
    [Transition].CurrentMember,
      Order(
      Filter(
      [Transition].[Transition].Members,
      [Measures].[Workdays in transition status]>0
      ),
      [Transition].CurrentMember.key,
      BASC
      )
  )
  ),
  [Measures].[Workdays in transition status]
  )
END

```

Then you could create a calculated member in the “Transition” dimension using [aggregate](https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/aggregate) to force the correct order for Transition dimension members.

Martins / eazyBI support

 ![image](https://community.eazybi.com/uploads/default/original/2X/0/07aabdf21a0d334f388c532bdb6508ad35d052e2.jpeg)  
 ![image](https://community.eazybi.com/uploads/default/original/2X/0/0dd05a5a4c8c38c4b945b499a58f982c62ff01a2.jpeg)

---

<div class="post-metadata">

**Author:** ![soumen\_jana](https://community.eazybi.com/user_avatar/community.eazybi.com/soumen_jana/32/5385_2.png) [@soumen\_jana](https://community.eazybi.com/u/soumen_jana)\
**Post date:** [December 2, 2021, 1:34pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/3 "2021-12-02T13:34:03Z")

</div>

Hi @martins.vanags

Thanks for the suggestion.  
I have followed the steps. The calculated member in Transition dimension is working fine.  
I have the transitions as follows:  
Ready for dev-\>In progress-\>ready for qa-\> QA → ready for ft → ft

There maybe some backtrack status like ,QA → In Progress. But as of now above is my target.

But the calculated measure is not working in a cumulative way and also they are not matching with Workdays in Transition values. Here’s the screenshot

 ![Attachment](https://community.eazybi.com/uploads/default/original/2X/7/7b997bc97e1df1a77026a27e889320e965bac2b5.png)

Note: I can have 0 values in any transition. So I tried to use greater than equal in the formula as well. But failed.

Here’s my calculated member in Transition dimension

**Aggregate** ({[**Transition**].[**In Progress =\> Ready for QA**],  
[**Transition**].[**Ready for QA =\> QA**],  
[**Transition**].[**QA =\> ready for ft**],  
[**Transition**].[**ready for ft =\> FT**]})

Please help…

---

<div class="post-metadata">

**Author:** ![martins.vanags](https://community.eazybi.com/user_avatar/community.eazybi.com/martins.vanags/32/8905_2.png) [@martins.vanags](https://community.eazybi.com/u/martins.vanags)\
**Post date:** [December 2, 2021, 2:49pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/4 "2021-12-02T14:49:33Z")

</div>

Try this code for defined workflow order:

```auto
Sum(
    Head(
      Childrenset([Transition].[Jira workflow]),
      Rank(
        [Transition].CurrentMember,
        Childrenset([Transition].[Jira workflow])
      )
    ),
  [Measures].[Workdays in transition status]
  )

```

---

<div class="post-metadata">

**Author:** ![soumen\_jana](https://community.eazybi.com/user_avatar/community.eazybi.com/soumen_jana/32/5385_2.png) [@soumen\_jana](https://community.eazybi.com/u/soumen_jana)\
**Post date:** [December 2, 2021, 5:46pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/5 "2021-12-02T17:46:25Z")

</div>

Hi @martins.vanags

It is working . Thank you for help.

But I am facing a challenge on the issue summary.  
I have used Time dimension as Previous month on the Page tab, to filter out my issues.  
As a result, I am getting only those issues who have the ‘ **Jira Workflow** ’ transitions made on previous month.

But when i am exclusively trying to get the issue names by using **[Issue].CurrentMember.name**, I am getting all other issues as well in my report. But I want only those issue names that I got after calculating the cumulative sum.

Any help or suggestion for this please…

---

<div class="post-metadata">

**Author:** ![soumen\_jana](https://community.eazybi.com/user_avatar/community.eazybi.com/soumen_jana/32/5385_2.png) [@soumen\_jana](https://community.eazybi.com/u/soumen_jana)\
**Post date:** [December 7, 2021, 7:02am UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/6 "2021-12-07T07:02:01Z")

</div>

Hi @martins.vanags ,

Any help on the above issue?  
My other calculations are dependent on it.

---

<div class="post-metadata">

**Author:** ![martins.vanags](https://community.eazybi.com/user_avatar/community.eazybi.com/martins.vanags/32/8905_2.png) [@martins.vanags](https://community.eazybi.com/u/martins.vanags)\
**Post date:** [December 7, 2021, 3:45pm UTC](https://community.eazybi.com/t/calculate-cumulative-sum-only-for-the-rows-of-a-particular-issue/8270/7 "2021-12-07T15:45:53Z")

</div>

Please use “ **Nonemtpy** ” cross join for report rows to show issues related to page filter.  
[https://docs.eazybi.com/eazybi/analyze-and-visualize/create-reports#Createreports-Pagedimensions](https://docs.eazybi.com/eazybi/analyze-and-visualize/create-reports#Createreports-Pagedimensions)

If that didn’t help, reach out to [support@eazybi.com](mailto:support@eazybi.com) and provide the report definition and more details about your use case.

Martins / eazyBI team
