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
desarrollosbi
Frequent Visitor

problema query, no se puede programar tarea para actualizar desde online services power bi

 

En esta consulta actualizamos informacion dando actualizar en desktop, el query selecciona el archivo mas actualizado en un repositorio, pero solo funciona en power bi desktop, funciona muy bien, pero ocupamos que funcione en el sitio online de powebi y hemos visto que no se puede programar la actualizacion nos muestra el siguiente mensaje:

 

No puede programar la actualización para este conjunto de datos porque los siguientes orígenes de datos no admiten la actualización:

  • Origen de datos de BD_Covid

 

Descubrir orígenes de datos

Query contains unsupported function. Function name: Web.Contents

 

 

Query:

let
Origen = /* List.Dates ( #date(2020,01,01), Number.From ( Duration.Days( Number.From ( Date.From (DateTime.LocalNow()) ) - Number.From ( #date(2020,01,01) ) )), #duration( 1,0,0,0 ) )*/
Table.RenameColumns(
Table.FromList( List.Dates ( #date(2020,01,01), Number.From(DateTime.LocalNow()) - Number.From (#date(2020,1,1) ) , #duration(1,0,0,0)), Splitter.SplitByNothing(), null, null, ExtraValues.Error),{{"Column1", "Fecha"}}),
#"Tipo cambiado" = Table.TransformColumnTypes(Origen,{{"Fecha", type date}}),
TextoFecha = Table.AddColumn(#"Tipo cambiado", "TextoFecha(MM-DD-YYYY)", each Text.Combine({Date.ToText([Fecha], "MM"), "-", Date.ToText([Fecha], "dd"), "-", Date.ToText([Fecha], "yyyy")}), type text),
#"Se inserta la URL" = Table.AddColumn(TextoFecha, "URL_Dinamica", each Csv.Document(Web.Contents(
"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_da..."))),
#"Errores quitados" = Table.RemoveRowsWithErrors(#"Se inserta la URL", {"URL_Dinamica"}),
#"Columnas quitadas" = Table.RemoveColumns(#"Errores quitados",{"TextoFecha(MM-DD-YYYY)"}),
#"Filas filtradas" = Table.SelectRows(#"Columnas quitadas", let latest = List.Max(#"Columnas quitadas"[Fecha]) in each [Fecha] = latest),
#"Columnas quitadas1" = Table.RemoveColumns(#"Filas filtradas",{"Fecha"}),
#"Se expandió URL_Dinamica" = Table.ExpandTableColumn(#"Columnas quitadas1", "URL_Dinamica", {"Column1", "Column2", "Column3", "Column4", "Column5", "Column6", "Column7", "Column8", "Column9", "Column10", "Column11", "Column12"}, {"URL_Dinamica.Column1", "URL_Dinamica.Column2", "URL_Dinamica.Column3", "URL_Dinamica.Column4", "URL_Dinamica.Column5", "URL_Dinamica.Column6", "URL_Dinamica.Column7", "URL_Dinamica.Column8", "URL_Dinamica.Column9", "URL_Dinamica.Column10", "URL_Dinamica.Column11", "URL_Dinamica.Column12"}),
#"Encabezados promovidos" = Table.PromoteHeaders(#"Se expandió URL_Dinamica", [PromoteAllScalars=true]),
#"Tipo cambiado1" = Table.TransformColumnTypes(#"Encabezados promovidos",{{"FIPS", Int64.Type}, {"Admin2", type text}, {"Province_State", type text}, {"Country_Region", type text}, {"Last_Update", type datetime}, {"Lat", type text}, {"Long_", type text}, {"Confirmed", Int64.Type}, {"Deaths", Int64.Type}, {"Recovered", Int64.Type}, {"Active", Int64.Type}, {"Combined_Key", type text}})
in
#"Tipo cambiado1"

 

Existe alguna manera de hacer que funcione la actualizacion programada desde el services powerbi?

Gracias

Saludos

JaBI

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

Not all Web.Contents functions require a gateway and it's not very well documented which ones do and do not. Sometimes you can get around the gateway requirement, but not always. 

 

https://community.powerbi.com/t5/Issues/Error-on-apply-Power-Query-Expression-in-partition-n-a-in-ta...

 

Install a gateway and it will work (even personal mode should work for this one). 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

2 REPLIES 2
AllisonKennedy
Super User
Super User

Not all Web.Contents functions require a gateway and it's not very well documented which ones do and do not. Sometimes you can get around the gateway requirement, but not always. 

 

https://community.powerbi.com/t5/Issues/Error-on-apply-Power-Query-Expression-in-partition-n-a-in-ta...

 

Install a gateway and it will work (even personal mode should work for this one). 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

nandukrishnavs
Super User
Super User

@desarrollosbi 

 

Try to install the On-premise gateway (not personal mode) https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-install#download-and-insta...

Then add your data source in your gateway cluster. https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-manage

 

Then check whether it is working or not.



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

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.