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
siva_powerbi
Helper IV
Helper IV

Concatenación del nombre de columna dinámica a la tabla - Power Query

Estoy intentando crear listas de datos mediante columnas dinámicas, obteniendo el nombre de la columna y anexándolo a la tabla.

Aquí está el problema como este paso está lanzando el error:

Expression.Error: No podemos aplicar operador & a los tipos Tabla y Texto.

Detalles:
Operador &
Izquierda[Tabla]
Derecha-Test1

Código:

Dejar
Fuente: Excel.Workbook(File.Contents("C:-Usuarios-Sivakumar A-Desktop-Power BI-test1.xlsx"), null, true),
Sheet2_Sheet de origen de la fuente [Artículo"Hoja2","Hoja"]-[Datos],
"Encabezados promocionados" - Table.PromoteHeaders(Sheet2_Sheet, [PromoteAllScalars-true]),
"Tipo cambiado" - Table.TransformColumnTypes('Encabezados promocionados",'Test1','texto', ''Test2', Int64.Type', ''Test3', Int64.Type', ''Test4', ''Test4', Int64.Type'),
"Nombres de col" - Table.ColumnNames(-"Changed Type"),
"Generar" - List.Generate(() ?> [i-1,x- Table.FromList('"Col Names",Splitter.SplitByNothing())],
cada [i]<List.Count(-"Col Names"),
cada uno de ellos [
i[i]+1,
x"Encabezados Promocionados"&"Nombres de Col"-i-

],
cada [x])
En
Generar

Necesito extraer los nombres de columna y anexarlos al talble y ejecutar en bucle

Cualquier ayuda es apreciada.

1 ACCEPTED SOLUTION

@MFelix Gracias por remitir el post.

Pude resolver el problema usando doble bastante 3 veces.

"Table.Distinct(Table.FromList('"&""Sheet2 (2)"""&"["&"Col Names"'i'&"], Splitter.SplitByNothing(), null, null, ExtraValues.Error))"

View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hola @siva_powerbi ,

Me estoy refiriendo a este post para @ImkeF el mejor superusuario del idioma M en este foro.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix Gracias por remitir el post.

Pude resolver el problema usando doble bastante 3 veces.

"Table.Distinct(Table.FromList('"&""Sheet2 (2)"""&"["&"Col Names"'i'&"], Splitter.SplitByNothing(), null, null, ExtraValues.Error))"

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.