Anonymous
6 years agoNot applicable
Status:
New
Error on apply Power Query: Expression in partition n/a in table n/a references an unknown entity
let Source = AzureStorage.DataLake("https://xxxxx.dfs.core.windows.net/contoso-retail-dw/rssfeed/rawdata/date=" & DateTime.ToText(Date.AddDays(DateTime.LocalNow(), -1), "yyyy-MM-dd")), This Powe...
KnutErlandBrun
6 years agoFrequent Visitor
I think I've solved this, at least for my case. After removing option to use enhanced metadata format, I've re-written my web query, now using Web.Content() and Html.Table(). Here's a summary of my M-code (sorry, there is some norwegian here):
let
Helligdager = (Year) => let
Source = Web.Contents("https://www.wincalendar.com/kalender/", [RelativePath = "Norge-" & Number.ToText(Year)]),
Data_ = Html.Table(Source, {{"Column1", "TABLE.thlinks > * > TR > :nth-child(1)"}, {"Column2", "TABLE.thlinks > * > TR > :nth-child(2)"}, {"Column3", "TABLE.thlinks > * > TR > :nth-child(3)"}, {"Column4", "TABLE.thlinks > * > TR > :nth-child(4)"}}, [RowSelector="TABLE.thlinks > * > TR"]),
Out = Table.AddColumn(Data_, "År", each Year)
in Out,
cY = Date.Year(DateTime.LocalNow()),
#"Tilføyet spørringer" = Table.Combine({Helligdager(cY-1), Helligdager(cY), Helligdager(cY+1), Helligdager(cY+2), Helligdager(cY+3), Helligdager(cY+4), Helligdager(cY+5) }),
...
in
...As you see, the Html.Table() is complicated. I didn't write this myself; I did the following:
- Enabled preview feature 'new web query'.
- Add new source from web.
- Using the GUI tool, select the correct table.
- In advanced editor, copy the two lines containing Web.BrowserContent() and Html.Table()
- Open andvanced editor for old web-source, and replace lines for Source and Data.
- Important: Change Web.BrowserContent() method to Web.Content().
The use of 'RelativePath' inside a custom function also solves the issue of scheduled refresh in power bi service. I reccommend reading this blog post for details: https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power-bi/