Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Extraer tabla de la columna

Hola, chicos...

Estoy tratando de extraer todos los datos de esta columna manteniendo todos los datos en una sola columna, separados por comas.

Capture.PNG

Capture.PNG

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hola @Williamspsouza ,

Hemos añadido una columna personalizada para satisfacer sus requisitos.

24.jpg

if [Data] is table 
then 
  Text.Combine(
    List.Transform(
      List.Combine(Table.ToRows([Data]))
      , each Text.From(_)
      )
    ,","
    )
else [Data]

25.jpg

Y podemos obtener el resultado de esta manera,

26.jpg

Todas las consultas están aquí:

let
    Source = Table.FromRows(
        {
          {1, null},
          {2, "QA"},
          {3, Table.FromRows({{"Camunda"}, {"Salesforce"}} ,{"Element:Text"})},
          {4, null},
          {5, Table.FromRows({{"A",1}, {"B",2}, {"C",4}} ,{"Element:Text2","AnotherID"})}
        }
      ,{"ID", "Data"}),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each if [Data] is table 
then 
  Text.Combine(
    List.Transform(
      List.Combine(Table.ToRows([Data]))
      , each Text.From(_)
      )
    ,","
    )
else [Data])
in
    #"Added Custom"

Si no cumple con su requisito, ¿podría mostrar el resultado exacto esperado basado en la tabla que compartimos?

BTW, pbix como adjunto.

Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hola @Williamspsouza ,

¿Qué tal el resultado después de seguir las sugerencias mencionadas en mi publicación original? ¿Podría proporcionar más detalles al respecto si no cumple con su requisito?


Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hola @Williamspsouza ,

Hemos añadido una columna personalizada para satisfacer sus requisitos.

24.jpg

if [Data] is table 
then 
  Text.Combine(
    List.Transform(
      List.Combine(Table.ToRows([Data]))
      , each Text.From(_)
      )
    ,","
    )
else [Data]

25.jpg

Y podemos obtener el resultado de esta manera,

26.jpg

Todas las consultas están aquí:

let
    Source = Table.FromRows(
        {
          {1, null},
          {2, "QA"},
          {3, Table.FromRows({{"Camunda"}, {"Salesforce"}} ,{"Element:Text"})},
          {4, null},
          {5, Table.FromRows({{"A",1}, {"B",2}, {"C",4}} ,{"Element:Text2","AnotherID"})}
        }
      ,{"ID", "Data"}),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each if [Data] is table 
then 
  Text.Combine(
    List.Transform(
      List.Combine(Table.ToRows([Data]))
      , each Text.From(_)
      )
    ,","
    )
else [Data])
in
    #"Added Custom"

Si no cumple con su requisito, ¿podría mostrar el resultado exacto esperado basado en la tabla que compartimos?

BTW, pbix como adjunto.

Saludos

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AiolosZhao
Memorable Member
Memorable Member

Hola @Williamspsouza ,

¿Podría compartirme un ejemplo de datos?

Así que puedo tratar de resolverlo en mi escritorio primero para asegurarme de que mi manera está funcionando.

Gracias

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.