4 Replies Latest reply on Dec 29, 2016 5:41 AM by ammar.khwaira

# Running Sum with Attr function using If statment

Hi

I have a situation where i need to create a dual axis line chart.  One line represent the running sum across weeks, and the other line represents running sum across weeks for critical issues only.

i have created a calculated field which checks for priority if it is = 'Critical' , then get the running sum ( i have put Attr function to remove the error of mixing aggregate and non aggregate functions). This calculated field is not working, it gives empty results for the running sum.

Week 1 should show :    Line 1 =   3 issues,    Line 2 = 1 critical issue.

Week 2 should show :    Line 1 =   8 issues,     Line 2 =  4 critical issues.

how to make ATTR works with running sum in this case ?

Thank you.

• ###### 1. Re: Running Sum with Attr function using If statment

Hi,

As far as I can see, there is no reason to do these complicated calculations.  You can just put counter on rows, and make a simple calculation checking whether a status is critical. Then run a table calculation on these measures.  Please find my solution in the attached workbook.

Thanks to Timothy Vermeiren for providing this solution.

Kind regards,

Wim

• ###### 2. Re: Running Sum with Attr function using If statment

Hi Wim

Thanks for the reply , would you please attache the twbx so i can check ?

• ###### 3. Re: Running Sum with Attr function using If statment

Woops, sorry.  Here it is.

1 of 1 people found this helpful
• ###### 4. Re: Running Sum with Attr function using If statment

Thanks Wim. That helped me to rethink it again.

Actually i needed to write the running sum function myself in order to use the calculated field in other calculations , like week over week changes.