Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hola a todos
He estado buscando sin encontrar la respuesta, si puede obtener ayuda por favor
Tengo una pestaña con lo siguiente (ejemplo)
| ID de ruta | Un punto | Punto B | SegmentHeader |
| 1 | GPSA | GPSB | __GPS3__GPS4__GPS5__ (puede haber muchos puntos GPS aquí) |
Necesito crear una tabla con los siguientes resultados (resultados de filas)
RouteID = 1
| ID de ruta | Un punto | Punto B |
| 1 | GPSA | GPS3 |
| 1 | GPS4 | GPS5 |
| 1 | GPS5 | GPSB |
Supongo que hay un tiempo para pasar por la primera mesa, luego una división en el separador ___, pero honestamente, estoy un poco perdido
alguien a quien ayudar?
¡¡¡gracias!!!
David
Muchas gracias, funciona
Hola
Los datos no se pegan correctamente en un archivo de MS Excel. Coloque ambas tablas en un archivo de MS Excel y comparta el enlace de descarga de ese archivo.
let
Source = Table.FromRows(
Json.Document(
Binary.Decompress(
Binary.FromText("i45WMlTSUXIPCHaEUE5AKj4eyDAGkyZg0jQ+Xik2FgA=", BinaryEncoding.Base64),
Compression.Deflate
)
),
let
_t = ((type nullable text) meta [Serialized.Text = true])
in
type table [RouteID = _t, #"A Point" = _t, #"B Point" = _t, SegmentHeader = _t]
),
#"Added Custom" = Table.AddColumn(
Source,
"Custom",
each List.Zip(
{
{[A Point]} & List.RemoveItems(Text.Split([SegmentHeader], "__"), {""}),
List.RemoveItems(Text.Split([SegmentHeader], "__"), {""}) & {[B Point]}
}
)
),
#"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom"),
#"Extracted Values" = Table.TransformColumns(
#"Expanded Custom",
{"Custom", each Text.Combine(List.Transform(_, Text.From), ","), type text}
),
#"Removed Other Columns" = Table.SelectColumns(#"Extracted Values", {"RouteID", "Custom"}),
#"Split Column by Delimiter" = Table.SplitColumn(
#"Removed Other Columns",
"Custom",
Splitter.SplitTextByEachDelimiter({","}, QuoteStyle.Csv, false),
{"A Point", "B Point"}
),
#"Changed Type" = Table.TransformColumnTypes(
#"Split Column by Delimiter",
{{"RouteID", Int64.Type}, {"A Point", type text}, {"B Point", type text}}
)
in
#"Changed Type"
Cómo usar este código: Crear una nueva consulta en blanco. Haga clic en "Editor avanzado". Reemplace el código en la ventana con el código proporcionado aquí. Haga clic en "Listo".
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!