Hi,
i have two scenario, my main object to fill the External city blank from Internal city by using reference.
1st Scenario
i have only one internal row, with using ref column i want to bring the city to external row
| leg | Value | City | ref |
| External | 2 | 253 | |
| External | 3 | 253 | |
| External | 1 | 253 | |
| Internal | 6 | Chennai | 253 |
2nd scenario
i have two internal line by using ref column and value, i need to bring the city to external, like for Chennai we have value 4 for external any number which sum to 4 i need to give Chennai and remaining I need to give Delhi
| leg | Value | City | ref |
| External | 2 | 253 | |
| External | 3 | 253 | |
| External | 1 | 253 | |
| External | 1 | 253 | |
| Internal | 4 | Chennai | 253 |
| Internal | 3 | Delhi | 253 |
kindly help how to achieve this using Alteryx
@Anbumani with the help of multi-row formula you can achieve the result of scnario1, Sample attached
what is the expected result for the second scnario?
@binu_acs for second scenario if you see the table for external leg the total value we have 7 and for internal we have two separate value one is 3 for Delhi and 4 for Chennai, by using ref column and I want to bring the city to external leg but it should sum the external value for any sum of value 4 it should give Chennai and for others its should give Delhi.
for 1st scenario I want to use the ref column and fill the city and along with this it should satisfiy the second scenario
@Anbumani Can you provide the expected result for scnario2 for better understanding?
@binu_acs Like the red highlighted i need the output
| leg | Value | City | ref |
| External | 2 | Chennai | 253 |
| External | 3 | Delhi | 253 |
| External | 1 | Chennai | 253 |
| External | 1 | Chennai | 253 |
| Internal | 4 | Chennai | 253 |
| Internal | 3 | Delhi | 253 |
@Anbumani but if you take 3+1 it would give you 4 as well , that means External 3 also fall in Chennai I guess?

