The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hola Expertos en PBI
Tengo una tabla simple que necesito transponer para que las FECHAS (Año-Wk) se muevan de las filas a las columnas.
Este es mi formato actual;
Valor de MeasureID año-semana
2020-01 A 5
2020-02 A 10
2020-01 B 15
2020-02 B 20
Quiero transponer en carga para obtener los datos en una tabla que se ve así;
MeasureID 2020-01 2020-02
A 5 10
B 15 20
Lo he intentado de muchas maneras, pero no puedo conseguir que funcione. Se siente como si debería haber una respuesta simple, así que esperando que alguien pueda ayudar...
Solved! Go to Solution.
Consulte, si el pivote puede ayudar
https://radacad.com/pivot-and-unpivot-with-power-bi
Editor de consultas > Columna dinámica
Paul Zheng
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Trabaja un placer - gracias!
Editor de consultas > Columna dinámica
Paul Zheng
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Esto funciona - gracias!
Aquí está la versión de Power Query:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtA1MFTSUXIEYlOlWB2YmBFUzNAASRCk0AkkiK4SJGgEVBkLAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [#"Year-Week" = _t, MeasureID = _t, Value = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Year-Week", type date}, {"MeasureID", type text}, {"Value", Int64.Type}}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Changed Type", {{"Year-Week", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Changed Type", {{"Year-Week", type text}}, "en-US")[#"Year-Week"]), "Year-Week", "Value", List.Sum)
in
#"Pivoted Column"
Brillante - gracias.
Consulte, si el pivote puede ayudar
https://radacad.com/pivot-and-unpivot-with-power-bi
Sí, esto funcionó. Gracias.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the July 2024 Power BI update to learn about new features.