Forum Discussion
Compare two diffrent tables
Hello Power Bi Community,
I need to create a new column in table A to compare two serial numbers from two different tables (one is in table A and the other in table B), if the serial number matches I need to insert in the new column in table A a value from table B which is in the same row as the serial number. For example:
Tabel A:
Serialnumber | New created column |
1 | 12,3 |
2 | 11,4 |
3 |
|
4 | 13 |
5 |
|
Tabel B:
Serialnumber | Value form tabel B |
1 | 12,3 |
2 | 11,4 |
4 | 13 |
Thanks for your help
Greeting Lukas
4 Replies
- Greg_Deckler
Community Champion
Anonymous Maybe:
Column = LOOKUPVALUE('TableB'[Value],'TableB'[Serialnumber],'TableA'[SerialNumber])- AnonymousNot applicable
Din't work. The error message is: A table with several values was returned although a single value was expected.
- amitchandak
Super User
Anonymous , Try a new column like
if( Table1[value] = maxx(filter(Table2, Table2[Serialnumber] = table1[Serialnumber]),Table2[Value]),1,0)
- AnonymousNot applicable
I tryed this:
New column = if(LOOKUPVALUE(Table2[SN],Table2[SN],Table1[SN]),1,0)With this function I have a 1 in every line where the serial numbers are the same. Now I just have to somehow replace the 1 with the value in table 2.😅