Forum Discussion
Syndicate_Admin
Administrator
3 years agoPivot en Power Query
Hi Expertos,
¿Cómo podemos lograr pivotar por debajo en Power Query o cerca de esto?
¿Por favor ayuda?
| Usuario | Categoría | ID de plantilla | Título | ID del documento | ||
| 1 | HACHA | 10 | AA | 94237 | ||
| 1 | HACHA | 10 | APAGADO | 94237 | ||
| 1 | HACHA | 10 | Y | 94237 | ||
| 2 | HACHA | 10 | AA | 94000 | ||
| Salida | ||||||
| Usuario | Categoría | ID de plantilla | Título1 | Título2 | Título3 | ID del documento |
| 1 | HACHA | 10 | AA | APAGADO | Y | 94237 |
| 2 | HACHA | 10 | AA | 94200 |
2 Replies
- Syndicate_Admin
Administrator
Prueba este, copia al editor avanzado:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXKMABKGBiCWI5CwNDEyNleK1cGQdMIn6YwiaYTNWAMDA6XYWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [User = _t, Category = _t, #"Template ID" = _t, Title = _t, #"Document ID" = _t]),
#"Duplicated Column1" = Table.DuplicateColumn(Source, "Title", "Title - Copy"),
#"Pivoted Column" = Table.Pivot(#"Duplicated Column1", List.Distinct(#"Duplicated Column1"[Title]), "Title", "Title - Copy")
in
#"Pivoted Column"Espero que esto te ayude.
- Syndicate_Admin
Administrator
Gracias @grandtotal , funcionó para mí. ¿Puede explicar la lógica / truco aquí 😂