Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Possuo um problema no qual necessito preencher os valores vazios da coluna fruta na tabela A com os valores de fruta na tabela B usando como referência o ID. Nesse caso , necessito de uma solução na espécie de procv, sem criar outra tabela ou coluna. Exemplo:
Tabela A:
ID | Fruta |
1 | Melancia |
2 | |
3 | Banana |
4 | |
5 | Melão |
Tabela B
ID | Fruta |
2 | Melão |
4 | Laranja |
O que quero: Tabela A
1 | Melancia |
2 | Melão |
3 | Banana |
4 | Laranja |
5 | Melão |
Solved! Go to Solution.
You could do it with a merge in the query editor, but given your sample data it would be simpler/faster to use append. Append one table to the other in the query editor (pick Append Queries on the Home tab), and then Filter the Fruta column to remove blank rows.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi @scoparr ,
You could use "Replace" function, it don't need to create extra columns.
= Table.ReplaceValue(#"Changed Type"," ",each (let a = [ID] in Table.SelectRows(#"Table B", each [ID] = a)){0}[Fruta],Replacer.ReplaceText,{"Fruta"})
Here is my test file for your reference.
Hi @scoparr ,
You could use "Replace" function, it don't need to create extra columns.
= Table.ReplaceValue(#"Changed Type"," ",each (let a = [ID] in Table.SelectRows(#"Table B", each [ID] = a)){0}[Fruta],Replacer.ReplaceText,{"Fruta"})
Here is my test file for your reference.
You could do it with a merge in the query editor, but given your sample data it would be simpler/faster to use append. Append one table to the other in the query editor (pick Append Queries on the Home tab), and then Filter the Fruta column to remove blank rows.
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.