running sum/count by rows

maring28

New Member
Joined
Jul 24, 2013
Messages
18
Hello again :),

I'm battering with my PP model, as it poses new challenges all the time, this time it's about running sum/count when there's NO DATES involved.
I've been searching the web and couldn't find anything about it.
I have the first two columns, and need to generate the third. Every time there's a "N", I need to add another +1 to the previos cell. in total, the last value in 'accumulate' column is counting the number of "N" values in the table.
Tried to use CALCULATE with EARLIER without success....
[TABLE="width: 235"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][TABLE="width: 235"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]accumulate[/TD]
[TD]indicator2[/TD]
[TD]indicator[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]1[/TD]
[TD]N[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

any suggestions would be welcomed...
Thanks alot!
Marina
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
well... Somehow I managed to guess my way with this :)
the solution is to add an index column, and then using EARLIER with this index column:
=CALCULATE(
sum([indicator2]),FILTER(ALL(table1),[index]<=EARLIER([index]))
)
simple now that I think of it... :biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,034
Messages
6,176,001
Members
452,695
Latest member
Alhassan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top