This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hola
Tengo una mesa que se ve así:
| Id | Q1 | Q2 | Q1Coments | Q2Coments |
| 1 | Sí | Sí | bien | Excelente |
| 2 | Sí | Sí | bien | Excelente 2 |
| 3 | No | No | No tan bueno | Malo |
| 4 | Sí | N/A | Bien | No se aplica. |
y le gustaría hacerlo así
| Id | Preguntas | Respuesta | Comentarios | AnswerComments |
| 1 | Q1 | Sí | Q1Coments | bien |
| 1 | Q2 | Sí | Q2Coments | Excelente |
| 2 | Q1 | Sí | Q1Coments | bien |
| 2 | Q2 | Sí | Q2Coments | Excelente 2 |
.
.
.
¿Hay algo posible en hacer eso?
Solved! Go to Solution.
@jinweitan , En Power Query tienes que despivot
referirse https://radacad.com/pivot-and-unpivot-with-power-bi
Es posible que tenga que despotable dos veces - https://kohera.be/blog/power-bi/how-to-unpivot-twice/
Seleccione Q1Comments y Q2Comments en Editar consulta y haga clic en el botón Unpivot.
Aquí está PowerQuery para su referencia.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUYpMLYaT7vn5KUDKtSI5NScnNa9EKVYnWsmIgCIFI7AyY6CYXz6CKFEozldIh6h1SkwBqzGBG+Kn7wgk/bMTK6GKEwsKcjJTU/SUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Q1 = _t, Q2 = _t, Q1Comments = _t, Q2Comments = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Q1", type text}, {"Q2", type text}, {"Q1Comments", type text}, {"Q2Comments", type text}}),
#"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"ID", "Q1", "Q2"}, "Attribute", "Value")
in
#"Unpivoted Columns"
@jinweitan , En Power Query tienes que despivot
referirse https://radacad.com/pivot-and-unpivot-with-power-bi
Es posible que tenga que despotable dos veces - https://kohera.be/blog/power-bi/how-to-unpivot-twice/
Hola @jinweitan ,
1. Haga clic en el botón "Transformar datos" para entrar en la página Editor de Power Query.
2. Elija la tabla de la izquierda y haga clic con el botón derecho en la columna ID.
3. Elija Despivot otras columnas.
Es posible que deba duplicar la tabla y despomparete por separado.
A continuación, utilice la función merge para obtener lo que desea tabla.
Por favor, inténtelo.
Aiolos Zhao
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.