Calculate Function With 2 Criteria

bravo1563

New Member
Joined
Dec 25, 2013
Messages
20
Hello All,
I have a pretty easy formula that I need to tweak. Below is my table data, I'll I'm trying to do is write a calculated column that sums any the values in (Value to Sum) on each row less than or equal to the "Date" and "Investor".

I've tried using the calculate function but nothing's filtering correctly I keep getting the total of 327. Here's the formula I've written
=CALCULATE(SUM([Value to Sum]),filter(Table1,Table1[Date]<=[Date]),FILTER(Table1,Table1[Investor]=[Investor]))

The Excel formula would look like this...sumifs(value to sum, date,"<=&Date", investor, "@investor")
So for example the "red" investor with the date of 6/15/2016" should return a value of 79 (57+22). Any help would be greatly appreciated, thanks!

[TABLE="width: 316"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="align: center"]Deal[/TD]
[TD="align: center"]Investor[/TD]
[TD="align: center"]Date[/TD]
[TD="align: center"]Value to Sum[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]red[/TD]
[TD="align: center"]1/1/2016[/TD]
[TD="align: center"]57[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]green[/TD]
[TD="align: center"]5/5/2016[/TD]
[TD="align: center"]97[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]blue[/TD]
[TD="align: center"]10/2/2014[/TD]
[TD="align: center"]52[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]yellow[/TD]
[TD="align: center"]11/12/2015[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]hello[/TD]
[TD="align: center"]1/5/2013[/TD]
[TD="align: center"]49[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]red[/TD]
[TD="align: center"]6/15/2016[/TD]
[TD="align: center"]22[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]yellow[/TD]
[TD="align: center"]10/14/2015[/TD]
[TD="align: center"]50[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Code:
=CALCULATE(SUM([Value to Sum]),filter(Table1,Table1[Date]<=EARLIER( [Date] ) ),FILTER(Table1,Table1[Investor]=EARLIER( [Investor] ) ))
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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