Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I have a simple query that retrieves the time from a website. The query works in Power BI desktop and I can publish it to Power BI online Workspace. I want to be able to refresh the dataset in the published online version but it will not let me, it is greyed out.
This is the query from the desktop:
let Source = Web.Page(Web.Contents("http://localtimes.info/North_America/United_States/Arizona/Phoenix/")), Data = Source{1}[Data], #"Changed Type" = Table.TransformColumnTypes(Data,{{"Column1", type text}, {"Column2", type text}}), #"Transposed Table" = Table.Transpose(#"Changed Type"), #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]), #"Changed Type1" = Table.TransformColumnTypes(#"Promoted Headers",{{"Current local time:", type time}, {"Date:", type date}, {"Time zone:", type text}, {"Current time zone offset:", type text}, {"Twitter Share", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type1", "Custom", each [#"Date:"] & [#"Current local time:"]), #"Changed Type2" = Table.TransformColumnTypes(#"Added Custom",{{"Custom", type datetime}}) in #"Changed Type2"
And this is a screenshot of the greyed out Data Source Credentials:
Why can't I schedule this to refresh??
I faced the same problem, and to fix this, I open the Power Query in PBI Desktop, and refresh all the query previews and then save the PBI desktop file again. and then when I refresh the PBI dataset in PBI services online, the warning goes away.
Hope that works for you as well
@Bezos The issue is that you have used Web.Contents in your source line and therefore need a gateway. If you are using SharePoint online, you need to change your Source line in your M code to something compatable with "Connect Directly"
If its SharePoint Online, you wont need a gateway, but if its SharePoint on Premise you will.
For this particular code, it is expecting you to have a Gateway set up.