Hey guys, I would like to ask if how can I add numbers in a row based on a given code. I have a data here:
Code | Amount |
74584 | 95007.56 |
43575 | -400 |
43554 | 890 |
then I want to add these numbers to each code:
74584 = 700
43575= -50
43554= 10
Expected Amount:
Code | Expected Amount |
74584 | 95707.56 |
43575 | -450 |
43554 | 900 |
Can you help me with this one pls?
Just extending on @AngelosPachis solution and doing a full left join so that data is not missed out. If the code is not present in the list then the add is 0.
Workflow:
Hope this helps : )
Keep it simple and efficient:
Use Select Tool to modify the [Amount] field to Type: FixedDecimal, Size: 19.2, then using a Formula Tool, modify the [Amount] field values using the following expression:
If you have additional codes, modify accordingly.
IF [Code]=74584 THEN [Amount]+700 ELSEIF [Code]=43575 THEN [Amount]-50 ELSEIF [Code]=43554 THEN [Amount]+10 ELSE [Amount] ENDIF