March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hola, tengo un archivo de Excel como se muestra a continuación. ¿Cómo transformar los datos al resultado esperado?
Campaña | Nombre | Producto | Oficina | Producto | Oficina | Producto | Oficina |
A | B | P-1 | 123 | P-3 | 321 | P-5 | 456 |
C | D | P-2 | 444 | P-4 | 444 | P-6 | 666 |
Resultado previsto:
Campaña | Nombre | Producto | Oficina |
A | B | P-1 | 123 |
A | B | P-3 | 321 |
A | B | P-5 | 456 |
C | D | P-2 | 444 |
C | D | P-4 | 444 |
C | D | P-6 | 666 |
Solved! Go to Solution.
@PBI_newuser , Agregue este código en blanco Consulta en power query y compruebe
dejar
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXIC4gBdQyBpaGQMZoNIYyNDMNsUSJqYminF6kQrOQPZLmBRI5CoiQmYbYLENgOSZmZA1bEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) en la tabla de tipos [Campaign = _t, Name = _t, Product = _t, Amt = _t, Product.1 = _t, Amt.1 = _t, Product.2 = _t, Amt.2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Campaign", type text}, {"Name", type text}, {"Product", type text}, {"Amt", Int64.Type}, {"Product.1", type text}, {"Amt.1", Int64.Type}, {"Product.2", type text}, {"Amt.2", Int64.Type}}),
#"Otras columnas no votadas" = Table.UnpivotOtherColumns(#"Changed Type", {"Name", "Campaign"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter(".", QuoteStyle.csv), {"Attribute.1", "Attribute.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", Int64.Type}}),
#"Columna pivotada" = Table.Pivot(#"Changed Type1", List.Distinct(#"Changed Type1"[Attribute.1]), "Attribute.1", "Value")
en
#"Columna pivotada"
@PBI_newuser , Agregue este código en blanco Consulta en power query y compruebe
dejar
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUXIC4gBdQyBpaGQMZoNIYyNDMNsUSJqYminF6kQrOQPZLmBRI5CoiQmYbYLENgOSZmZA1bEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) en la tabla de tipos [Campaign = _t, Name = _t, Product = _t, Amt = _t, Product.1 = _t, Amt.1 = _t, Product.2 = _t, Amt.2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Campaign", type text}, {"Name", type text}, {"Product", type text}, {"Amt", Int64.Type}, {"Product.1", type text}, {"Amt.1", Int64.Type}, {"Product.2", type text}, {"Amt.2", Int64.Type}}),
#"Otras columnas no votadas" = Table.UnpivotOtherColumns(#"Changed Type", {"Name", "Campaign"}, "Attribute", "Value"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter(".", QuoteStyle.csv), {"Attribute.1", "Attribute.2"}),
#"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", Int64.Type}}),
#"Columna pivotada" = Table.Pivot(#"Changed Type1", List.Distinct(#"Changed Type1"[Attribute.1]), "Attribute.1", "Value")
en
#"Columna pivotada"
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.