Calculate

Centre13

New Member
Joined
Apr 10, 2013
Messages
14
Hi - I have a calulate expression which performs at a row level. I want to sum this expression at a product level. Any ideas how to do this?

calculate(min(Table1[Absolute USD Detail]),Table1[Bank Levy BS]="Derivatives",allexcept(table1,Table1[ADAC Unit ID],table1[Netting Set ID])) - this is the row level calc. How do I sum it up by product level.
</SPAN>
Many thx for your help.</SPAN>
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
In general it should "just work" which makes me think... maybe your above calculation is a "calculated column" (vs a measure, also called calculated field) ?

In general, this sort of measure would also probably do what you want?
=SUMX(Products, [YourMeasure])
 
Upvote 0
Hi Scott - thanks for the reply.
Yes it is a calculated column. I made the below adjustment but it seems to be adding the minimums for all products. Also, appears sumx requres a table reference and not a column reference so I cant seem to isolate the products.

=sumx(table1,calculate(min(Table1[Absolute USD Detail]),Table1[Bank Levy BS]="Derivatives",allexcept(table1,Table1[ADAC Unit ID],Table1[Cluster Name],Table1[Netting Set ID])))
 
Upvote 0
Well, in general... you are going to WANT a measure, not a calc column... so that this can be dynamic. eg, if you filter out Store 101, it adjusts properly.

That said, for a calc column, the general formula is:

=CALCULATE([SomeMeasure], FILTER(MyTable, MyTable[SomeColumn] = EARLIER[SomeColumn)))

Where in your case, SomeColumn is going to be your product level.
 
Upvote 0

Forum statistics

Threads
1,224,045
Messages
6,176,065
Members
452,703
Latest member
kinnowboxes

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