PowerPivot Calculated Field Filtering by value on row

inincubus

New Member
Joined
Mar 4, 2015
Messages
2
I am very new to PowerPivot..


I have a table that looks like this:
[TABLE="width: 174"]
<tbody>[TR]
[TD][TABLE="width: 87"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD="align: right"]188[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]190[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]298[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]186[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]128[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]147[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]127[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]198[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]132[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]160[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]183[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]117[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]126[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I'd like to add a column with calculated field that shows cumulative sales up to that month which will look like this:

[TABLE="width: 142"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Sales[/TD]
[TD]Balance[/TD]
[/TR]
[TR]
[TD="align: right"]0[/TD]
[TD="align: right"]188[/TD]
[TD="align: right"]220[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]190[/TD]
[TD="align: right"]378[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]298[/TD]
[TD="align: right"]676[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]186[/TD]
[TD="align: right"]862[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]128[/TD]
[TD="align: right"]990[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]147[/TD]
[TD="align: right"]1137[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]127[/TD]
[TD="align: right"]1264[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]198[/TD]
[TD="align: right"]1462[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]132[/TD]
[TD="align: right"]1594[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]160[/TD]
[TD="align: right"]1754[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]183[/TD]
[TD="align: right"]1937[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]117[/TD]
[TD="align: right"]2054[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]126[/TD]
[TD="align: right"]2180[/TD]
[/TR]
</tbody>[/TABLE]

I used this formula but doesn't seem to work..: =CALCULATE(SUM([SalesTotal]),FILTER(Salestbl,[Month]<[Month]))

Thanks in advance!
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,225,420
Messages
6,184,879
Members
453,264
Latest member
AdriLand

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