I need a little help modifying an expression
Current Scenario
I have a data set that includes Name and cost type (CT) and amount for a given year (2017 $).
For any cost type Bs, I need to add B to A. (B is always negative.) I use the following expression with the Multi-Row Tool set to create new field.
if [Row+1:CT] = 'B' then [2017 $] + [Row+1:2017 $] else [2017 $] endif
| Name | CT | 2017 $ |
| Jeep | A | 555 |
| G-Wagon | A | 1800 |
| G-Wagon | B | -100 |
| G-Wagon | C | 200 |
| HMMWV | A | 800 |
| HWMMV | B | -400 |
| Unimog | A | 700 |
Question
Now I need to add E to the expression. Like B, E is always negative. But, its still A+B+E.
How do I mod the expression to include E?
| Name | CT | 2017 $ |
| Jeep | A | 555 |
| G-Wagon | A | 1800 |
| G-Wagon | B | -100 |
| G-Wagon | E | -500 |
| G-Wagon | C | 200 |
| HMMWV | A | 800 |
| HWMMV | B | -400 |
| Unimog | A | 700 |
| | | |