My data is as seen below:
Data Source 1:
| Account | Country | Code |
| 10021854156 | Spain | 1010 |
151562 | Spain | 1030 |
| 12561864545132 | UK | 1020 |
| 526526346513 | UK | 1030 |
| 5262563 | Italy | 1030 |
| 8989856456 | Italy | 1010 |
Data source 2:
| Country | Code | Total Cost |
| Spain | 1010 | 100 |
UK | 1020 | 50 |
| Italy | 1030 | 220 |
| Spain | 1020 | 400 |
| UK | 1030 | 520 |
| Spain | 1030 | 36 |
| Italy | 1010 | 225 |
I would like to pull in the total cost from data source 2 into data source one but for the right code and the right country (2 conditions).
I have used a simply join with code and then country but it is not assigning the right country for some reason.
Please could someone assist?