CALCULATE and SUM

vbaisdaxing

New Member
Joined
Aug 23, 2017
Messages
12
[TABLE="width: 500"]
<tbody>[TR]
[TD]Letters[/TD]
[TD]amount[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]10[/TD]
[/TR]
</tbody>[/TABLE]

Hello Everyone,

What i am trying to accomplish is to run a CALCULATE function in conjunction with sum to always sum up the totals of its specific letter. In addition, I would like a= 25, b=5, and
c=30 even after slicing the data.

Any suggestions will be greatly appreciated.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
[TABLE="width: 500"]
<tbody>[TR]
[TD]Letters[/TD]
[TD]amount[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]10[/TD]
[/TR]
</tbody>[/TABLE]

Hello Everyone,

What i am trying to accomplish is to run a CALCULATE function in conjunction with sum to always sum up the totals of its specific letter. In addition, I would like a= 25, b=5, and
c=30 even after slicing the data.

Any suggestions will be greatly appreciated.

I would use either a pivot table or SUMIF function:

=SUMIF($A$2:$A$10,E2,$B$2:$B$10) where E2=a

but it depends on the "slicing" you would be doing
 
Upvote 0
I would like a= 25, b=5, and
c=30 even after slicing the data.

It is impossible to answer this question accurately without knowing the table names, relationships and what you are wanting to slice on. However, assuming you have 1 table, and assuming you have letters in a pivot table, the following will always give you totals by letter regardless of any other filter coming from the table.

total =CALCULATE(sum(table[value]),allexcept(table,table[letters]))
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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