The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hola a todos
Hace unos días hago una publicación sobre cómo añadir un campo más a mi mesa existente, @amitchandak compartir conmigo el vídeo de tu tubo hacer por él, después de ver i aunque es fácil.
Intento seguir el paso , i usando el PBI existente , eliminar la tabla CRM , e importar el archivo CSV desde sharepoint. funciona bien, ya que el nuevo campo Oferta de producto, logran importar a la tabla PBI CRM. ( También me aseguro de que el archivo CSV tenga nuevo nombre de campo = Oferta de producto )
Paso anterior con el fin de asegurarse de que el archivo CSV en sharepoint han añadido nuevo campo "Oferta de producto". Esto ha demostrado al ver a continuación el Código M :-
Entonces veo el código M , noto que debajo de 3 líneas necesitan cambios , para importar nuevo campo a PBI.
#"Tipo cambiado" = Table.TransformColumnTypes(#"CSV importado",{{"Column1", escriba text}, {"Column2", escriba text}, {"Column3", escriba text}, {"Column4", escriba text}, {"Column5", escriba text}, {"Column6", escriba text}, {"Column7", escriba text}, {"Column8", escriba text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}, {"Column16", type text}
#"Tipo de cambio1" = Table.TransformColumnTypes(#"Encabezados promocionados",{{"CRM_TS :", texto de tipo}, {"", texto de tipo}, {"_1", texto de tipo}, {"_2", texto de tipo}, {"_3", texto de tipo}, {"_4", texto de tipo}, {"_5", escriba text}, {"_6", escriba text}, {"_7", type text}, {"_8", type text}, {"_9", type text}, {"_10", type text}, {"_11", type text}, {"_12", type text}, {"_13", type text}, {"_14", type text}
#"Tipo cambiado2" = Table.TransformColumnTypes(#"Encabezados promocionados1",{{"POTENTIALID", texto de tipo}, {"Fecha de cierre", escriba date}, {"Deal Name", escriba text}, {"Stage", escriba text}, {"Nombre de la empresa", escriba text}, {"Nombre completo", escriba text}, {"Amount", type text}, {"Deal Owner", type text}, {"Main Segment", type text}, {"Sub Segment", type text}, {"Email", type text}, {"Mobile", type text}, {"Department", type text}, {"Title", type text}, {"SBU", typetext}, {"Product Offer", type text}
Lo que hice es, copie la sintaxis de color rojo anterior y el pasador en mi archivo PBI existente, voy a establecer borrar la caché , antes de hacer una recarga.
Obte tengo error , {"Column16", texto de tipo}no disponible.
Espero que alguien puede aconsejarme dónde ir mal ?
A continuación se muestra el código M cuando tienen #16 de columna pueden recargar bien :-
dejar
Origen = SharePoint.Files("https://isdnholdings.sharepoint.com/sites/FT_CRM", [ApiVersion = 15]),
#"CRM_TS csv_https://isdnholdings sharepoint com/sites/FT_CRM/Shared Documents/" = Source{[Name="CRM_TS.csv",#"Folder Path"="https://isdnholdings.sharepoint.com/sites/FT_CRM/Shared Documents/"]}[Content],
#"CSV importado" = Csv.Document(#"CRM_TS csv_https://isdnholdings sharepoint com/sites/FT_CRM/Shared Documents/",[Delimiter=",", Columns=16, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"CSV importado",{{"Column1", escriba text}, {"Column2", escriba text}, {"Column3", escriba text}, {"Column4", escriba text}, {"Column5", escriba text}, {"Column6", escriba text}, {"Column7", escriba text}, {"Column8", escriba text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}, {"Column16", type text}}
#"Encabezados promocionados" = Table.PromoteHeaders(#"Tipo cambiado", [PromoteAllScalars=true]),
#"Tipo de cambio1" = Table.TransformColumnTypes(#"Encabezados promocionados",{{"CRM_TS :", escriba text}, {"", type text}, {"_1", type text}, {"_2", type text}, {"_3", type text}, {"_4", type text}, {"_5", escriba text}, {"_6", type text}, {"_7", type text}, {"_8", type text}, {"_9", type text}, {"_10", type text}, {"_11", type text}, {"_12", type text}, {"_13", type text}, {"_14", type text}}),
#"Encabezados promocionados1" = Table.PromoteHeaders(#"Changed Type1", [PromoteAllScalars=true]),
#"Tipo cambiado2" = Table.TransformColumnTypes(#"Encabezados promocionados1",{{"POTENTIALID", texto de tipo}, {"Fecha de cierre", escriba date}, {"Deal Name", escriba text}, {"Stage", escriba text}, {"Nombre de la empresa", escriba text}, {"Nombre completo", escriba text}, {"Amount", type text}, {"Deal Owner", type text}, {"Main Segment", type text}, {"Sub Segment", type text}, {"Email", type text}, {"Mobile", type text}, {"Department", type text}, {"Title", type text}, {"SBU", type text}, {"Product Offer", type text}})
en
#"Cambiado Tipo2"
A continuación se muestra el código M después de insertar la sintaxis oferta de producto, pero obtener error msg :-
dejar
Origen = SharePoint.Files("https://isdnholdings.sharepoint.com/sites/FT_CRM/", [ApiVersion = 15]),
#"Filas filtradas" = Table.SelectRows(Source, cada una ([Nombre] = "CRM_TS.csv")),
#"CRM_TS csv_https://isdnholdings sharepoint com/sites/FT_CRM/Shared Documents/" = #"Filtered Rows"{[Name="CRM_TS.csv",#"Folder Path"="https://isdnholdings.sharepoint.com/sites/FT_CRM/Shared Documents/"]}[Content],
#"CSV importado" = Csv.Document(#"CRM_TS csv_https://isdnholdings sharepoint com/sites/FT_CRM/Shared Documents/",[Delimiter=",", Columns=15, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Tipo cambiado" = Table.TransformColumnTypes(#"CSV importado",{{"Column1", escriba text}, {"Column2", escriba text}, {"Column3", escriba text}, {"Column4", escriba text}, {"Column5", escriba text}, {"Column6", escriba text}, {"Column7", escriba text}, {"Column8", escriba text}, {"Column9", type text}, {"Column10", type text}, {"Column11", type text}, {"Column12", type text}, {"Column13", type text}, {"Column14", type text}, {"Column15", type text}, {"Column16", type text}}
#"Encabezados promocionados" = Table.PromoteHeaders(#"Tipo cambiado", [PromoteAllScalars=true]),
#"Tipo de cambio1" = Table.TransformColumnTypes(#"Encabezados promocionados",{{"CRM_TS :", escriba text}, {"", type text}, {"_1", type text}, {"_2", type text}, {"_3", type text}, {"_4", type text}, {"_5", escriba text}, {"_6", type text}, {"_7", type text}, {"_8", type text}, {"_9", type text}, {"_10", type text}, {"_11", type text}, {"_12", type text}, {"_13", type text}, {"_14", type text}}),
#"Encabezados promocionados1" = Table.PromoteHeaders(#"Changed Type1", [PromoteAllScalars=true]),
#"Tipo cambiado2" = Table.TransformColumnTypes(#"Encabezados promocionados1",{{"POTENTIALID", texto de tipo}, {"Fecha de cierre", escriba date}, {"Deal Name", escriba text}, {"Stage", escriba text}, {"Nombre de la empresa", escriba text}, {"Nombre completo", escriba text}, {"Amount", type text}, {"Deal Owner", type text}, {"Main Segment", type text}, {"Sub Segment", type text}, {"Email", type text}, {"Mobile", type text}, {"Department", type text}, {"Title", type text}, {"SBU", type text}, {"Product Offer", type text}}),
#"Valor reemplazado" = Table.ReplaceValue(#"Changed Type2","$", "",Replacer.ReplaceText,{"Amount"}),
#"Changed Type3" = Table.TransformColumnTypes(#"Replaced Value",{{"Amount", Int64.Type}})
en
#"Cambiado Tipo3"
¿Puedo saber al lado de la línea de código que necesito cambiar, qué otro necesito modificar? Así que el error msg puede desaparecer
Paul Yeo