Many to many with a slight twist

Joe_S

New Member
Joined
Feb 22, 2012
Messages
6
I have a situation with a many-to-many relationship that works fine, but a new wrinkle was introduced that I am struggling with.

The following measure works fine:
MyMeasure = CALCULATE(SUM(FactTable(Amount),BridgeTable)

However, I need to extend it by the multiplier column in the bridge table below. For my specific need, if the tomato category is fruit, I use the actual value, but if the category of tomato is a vegetable I would like to multiply it by -1 in my measure.


Thanks in advance.

BridgeTable
FoodCategoryMultiplier
TomatoFruit1
TomatoVegetable-1
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try this

Book1
ABC
1FoodCategoryMultiplier
2TomatoFruit1
3TomatoVegetable-1
Sheet2
Cell Formulas
RangeFormula
C2C2=IF(AND(A2="Tomato",B2="Fruit"),1,IF(AND(A2="Tomato",A2="Vegetable"),-1,""))
C3C3=IF(AND(A3="Tomato",B3="Fruit"),1,IF(AND(A3="Tomato",B3="Vegetable"),-1,""))
 
Upvote 0

Forum statistics

Threads
1,223,702
Messages
6,173,936
Members
452,539
Latest member
delvey

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