Forum Discussion
Anonymous
5 years agoNot applicable
Comparing 2 columns from same table to another table
New to Power BI
This seems very easy but I can not figure out.
I have 2 tables A and B I can not relate them. I need to add column "Lookup" to Table B. Lookup comes from Tabe A
See above for tables
| Table A | Table B | |||||
| Fruit | Color | Amt | Fruit | Color | Lookup | |
| Apple | R | 5 | Apple | R | 5 | |
| Orange | O | 2 | Orange | O | 2 | |
| Peach | O | 7 | Peach | O | 7 | |
| Pair | R | 8 | Pair | R | 8 | |
| Berry | F | |||||
| Apple | R | 5 | ||||
| Orange | O | 2 | ||||
| Pair | R | 8 |
Anonymous - Try LOOKUPVALUE or MAXX(FILTER(...),...) like:
Lookup Column = LOOKUPVALUE('TableA'[Amt],'TableA'[Fruit],[Fruit],'TableA'[Color],[Color]) or Lookup Column = MAXX(FILTER('TableA','TableA'[Fruit]=[Fruit] && 'TableA'[Color]=[Color]),'TableA'[Amt])
1 Reply
- Greg_DecklerCommunity Champion
Anonymous - Try LOOKUPVALUE or MAXX(FILTER(...),...) like:
Lookup Column = LOOKUPVALUE('TableA'[Amt],'TableA'[Fruit],[Fruit],'TableA'[Color],[Color]) or Lookup Column = MAXX(FILTER('TableA','TableA'[Fruit]=[Fruit] && 'TableA'[Color]=[Color]),'TableA'[Amt])