Forum Discussion
match multiple columns to show value
Is it possible to match values in two tables to show specific values?
In excel you can use =IFNA(ARRAYFORMULA(INDEX(xxxx,MATCH(yyyy&$zzzzz,cccc,0))),"N/A")
As you see in this table there is an order that haves two different SKU's
So I would need to have the logic as follows: if SKU and ORDER_NUMBER matches SKU_2 and ORDER_NUMBER_2 then show Sales Price. If I am just having a relationship between table 1[ORDER_NUMBER] and table 2[ORDER_NUMBER] I will get a total sales price for the whole order, but I need it to see the sales price per sku.
Table 1:
| SKU | ORDER_NUMBER | Refunded | Sales Price |
| XXOS124 | D123 | 10€ | |
| XXOS122 | D123 | 25€ | |
| XXOS125 | D129 | 21€ | |
| XXOS126 | D789 | 40€ |
Table 2:
| SKU_2 | ORDER_NUMBER_2 | Sales Price |
| XXOS124 | D123 | 20€ |
| XXOS122 | D123 | 5€ |
| XXOS125 | D456 | 48€ |
| XXOS126 | D789 | 60€ |
Anonymous , a New column in table 1
new column = maxx(filter(Table2, table2[ORDER_NUMBER_2] = Table1[ORDER_NUMBER] && Table2[SKU_2] = Table1[SKU]),Table2[Sales Price])
1 Reply
- amitchandak
Super User
Anonymous , a New column in table 1
new column = maxx(filter(Table2, table2[ORDER_NUMBER_2] = Table1[ORDER_NUMBER] && Table2[SKU_2] = Table1[SKU]),Table2[Sales Price])