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.
Hola a todos,
Tengo dos tablas con una cantidad diferente de filas. Me pregunto si es posible combinarlos sin interferir con los datos en ninguno de los dos. A continuación se muestran ejemplos de las dos tablas que tengo en mi archivo PBI.
Cotización del cliente | Cotización del producto | Presupuesto de cantidad |
manzana | PC | 1 |
Samsung | Teléfono | 5 |
Ventas de clientes | Producto de ventas | Ventas por cantidad |
IBM | PC | 3 |
En Facebook | Teléfono | 1 |
Esta tabla es el resultado esperado de lo que me gustaría que fuera la combinación de ambas tablas. Los pedidos de fila no importan, solo deseo que se combinen como a continuación.
Cotización del cliente | Producto del cliente | Cantidad del cliente | Ventas de clientes | Producto de ventas | Ventas por cantidad |
manzana | PC | 1 | IBM | PC | 3 |
Samsung | Teléfono | 5 | En Facebook | Teléfono | 1 |
¡Gracias!
Solved! Go to Solution.
No @NewPlsHelp ,
use Power Query de la siguiente manera:
// Table1
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciwoyElV0lEKcAYShkqxOtFKwYm5xaV56SDBjPw8kKSpUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Customer Quote" = _t, #"Product Quote" = _t, #"Quantity Quote" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer Quote", type text}, {"Product Quote", type text}, {"Quantity Quote", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
in
#"Added Index"
// Table2
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nTyVdJRCnAGEsZKsTrRSm6JyalJ+fnZINGM/LxUIG2oFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Customer Sales" = _t, #"Sales Product" = _t, #"Quantity Sales" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer Sales", type text}, {"Sales Product", type text}, {"Quantity Sales", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
in
#"Added Index"
// MergedTables
let
Source = Table.NestedJoin(Table1, {"Index"}, Table2, {"Index"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Customer Sales", "Sales Product", "Quantity Sales"}, {"Customer Sales", "Sales Product", "Quantity Sales"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Table2",{"Index"})
in
#"Removed Columns"
Con un cordial saludo desde la ciudad donde la leyenda del 'Gaitero pied de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)
No @NewPlsHelp ,
use Power Query de la siguiente manera:
// Table1
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WciwoyElV0lEKcAYShkqxOtFKwYm5xaV56SDBjPw8kKSpUmwsAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Customer Quote" = _t, #"Product Quote" = _t, #"Quantity Quote" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer Quote", type text}, {"Product Quote", type text}, {"Quantity Quote", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
in
#"Added Index"
// Table2
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8nTyVdJRCnAGEsZKsTrRSm6JyalJ+fnZINGM/LxUIG2oFBsLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Customer Sales" = _t, #"Sales Product" = _t, #"Quantity Sales" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Customer Sales", type text}, {"Sales Product", type text}, {"Quantity Sales", Int64.Type}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
in
#"Added Index"
// MergedTables
let
Source = Table.NestedJoin(Table1, {"Index"}, Table2, {"Index"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Customer Sales", "Sales Product", "Quantity Sales"}, {"Customer Sales", "Sales Product", "Quantity Sales"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Table2",{"Index"})
in
#"Removed Columns"
Con un cordial saludo desde la ciudad donde la leyenda del 'Gaitero pied de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)
Estoy seguro de que hay varias maneras de alcanzar su meta. Lo que hago a menudo es abrir Power Query y usar su funcionalidad de combinación.
En la pestaña Inicio de Power Query, haga clic en la flecha desplegable Combinar consultas y seleccione Combinar consultas como nuevas. Creará una nueva tabla combinada mientras deja sus 2 tablas originales como estaban.
Tendrá la opción de seleccionar qué tablas combinar y por qué columna desea combinar.
Esta introducción a las consultas de combinación de documentación de Microsoft debería ayudar
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.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
2 | |
1 | |
1 |