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
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
Food | Category | Multiplier |
Tomato | Fruit | 1 |
Tomato | Vegetable | -1 |