Forum Discussion
Shamatix
Post Partisan
6 years agoWe cannot apply field access to the type List.
Hi there fellow users of Power Bi, We have now gotten a bit further and is now stumbling upon a new error: "We cannot apply field access to the type List." Below is our M code let
// F...
- 6 years ago
In this case, it looks like it is trying to extract a list when it already got one. In that case try removing the final step in that function:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url) in Json,if that doesn't work due to the file having both forms try:
GetPage = (Index) => let Skip = "offset=" & Text.From(Index * EntitiesPerPage), Top = "?count=" & Text.From(EntitiesPerPage), Url = BaseUrl & Top & "&" & Skip, Json = GetJsonList(Url), Value = if Json is record then Json[#"value"] else else Json in Value,
artemus
Microsoft Employee
6 years agoIn this case, it looks like it is trying to extract a list when it already got one. In that case try removing the final step in that function:
GetPage = (Index) =>
let
Skip = "offset=" & Text.From(Index * EntitiesPerPage),
Top = "?count=" & Text.From(EntitiesPerPage),
Url = BaseUrl & Top & "&" & Skip,
Json = GetJsonList(Url)
in Json,
if that doesn't work due to the file having both forms try:
GetPage = (Index) =>
let
Skip = "offset=" & Text.From(Index * EntitiesPerPage),
Top = "?count=" & Text.From(EntitiesPerPage),
Url = BaseUrl & Top & "&" & Skip,
Json = GetJsonList(Url),
Value = if Json is record then Json[#"value"] else else Json
in Value,Shamatix
Post Partisan
6 years agoHi Artemus,
Thanks a ton for the solution!
However I have another major issue now:S
By chance you have skype and I can try descibe my issue there?
I am getting this:
There were too many elements in the enumeration to complete the operation.
Best regards