Forum Discussion
Dynamic Date and element in Power BI URL
- 6 years ago
Mehay ,
Yes, it's like a macro in Excel.
It keeps all the steps and apply them when the refresh happens.
- 6 years ago
Hi Mehay ,
We get this error if the page load is slower than the Power Query request, to fix it, use this code:
let Source = Web.BrowserContents("https://www.apple.com/covid19/mobility", [WaitFor = [Timeout = #duration(0,0,0,3)]]), Extract = Html.Table( Source, { {"Link", "#download-card > div.download-button-container > a", each [Attributes][href]} }, [RowSelector="#download-card > div.download-button-container"] ){0}[Link], GetData = Csv.Document(Web.Contents(Extract),[Delimiter=",",Encoding=65001, QuoteStyle=QuoteStyle.None]) in GetDataI just added a timer to delay the load of the page in Power Query.
the 2nd approach basically works well, it got exactly what I need.
Just a quick question, will my all filters remain same even after new data uploads in the apple system?
Mehay ,
Yes, it's like a macro in Excel.
It keeps all the steps and apply them when the refresh happens.
- Mehay6 years agoHelper I
Perfect, really appreciate your help, and thanks for all effort!
It worked perfectly, so now i just need to put a time slot for its own refresh once a day.
Regards,
Mehdi
- camargos886 years agoCommunity Champion
Hi Mehay ,
We get this error if the page load is slower than the Power Query request, to fix it, use this code:
let Source = Web.BrowserContents("https://www.apple.com/covid19/mobility", [WaitFor = [Timeout = #duration(0,0,0,3)]]), Extract = Html.Table( Source, { {"Link", "#download-card > div.download-button-container > a", each [Attributes][href]} }, [RowSelector="#download-card > div.download-button-container"] ){0}[Link], GetData = Csv.Document(Web.Contents(Extract),[Delimiter=",",Encoding=65001, QuoteStyle=QuoteStyle.None]) in GetDataI just added a timer to delay the load of the page in Power Query.
- Mehay6 years agoHelper I
Dear camargos88 ,
Now every time i try to refresh data it gives me error liek this with href file. Sometimes i open codes and just click okay and then data seems to be fine again, not sure what causes the problem.
- Mehay6 years agoHelper I
Once again thanks for your help, seems like working for now, hopefully its only error.
Have a great day ahead!
Regards,
Mehdi