Reference the sample dataset below. Basically I need to sum A-B or A-(B+E) for all ITEMS that have either a B, E, or B and E cost type.
IF ITEM is the same, and cost type B is present (but not E), subtract the sum of B from A
IF ITEM is the same, and both cost B and E are present, subtract the sum of B+E from A.
I know that I can use a Multi Row to subtract B from A if B exists. I assume I can do the same for B and E and then subtract from A. But, I am hoping there is simpler way of doing it.
| ITEM | COST TYPE | Value |
| Trucks | A | 341 |
| Planes | A | 2355 |
| Planes | C | 3252 |
| Boats | A | 13525 |
| Boats | B | -1345 |
| Boats | E | -1344 |
| Boats | L | 3425 |
| Rockets | A | 2355 |
| Rockets | B | -1345 |