I have two excel files. I have done a left join in Alteryx for these two files using Dealer group no. and Client code. I want create a flow in Alteryx where if NAT is Selected it will calculate the total amount using expression saved in the second excel file's "Amount" field. for example for Dealer group no. 10000 the total amount will be [A_Tax+B_Tax+C_Tax+D_Tax] i.e. 1400 and for Dealer group no. 10100 the total amount will be [A_Tax+B_Tax+C_Tax] i.e. 900. and so on. I want to use a formula tool and add a new column "Total Amount" where it uses the expression saved in the second excel files to add the Total Amount. Using a batch macro is also fine. Please help me with this.
| Client Code | Dealer Group no. | A_Tax | B_Tax | C_Tax | D_Tax |
| NAT | 10000 | 200 | 300 | 400 | 500 |
| NAT | 10100 | 200 | 300 | 400 | |
| EFR | 20000 | 200 | 300 | 400 | 500 |
| EFR | 20100 | 300 | 400 | 600 | 700 |
| Client Code | Dealer Group no. | ACIC | Amount |
| NAT | 10000 | No | A_Tax+B_Tax+C_Tax+D_Tax |
| NAT | 10100 | Yes | A_Tax+B_Tax+C_Tax |
| EFR | 20000 | No | A_Tax+B_Tax+C_Tax+D_Tax |
| EFR | 20100 | No | A_Tax+B_Tax+C_Tax+D_Tax |