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.
Hey, guys
I'm doing a query on Arcgis and it works perfectly on Power bi desktop, but on power bi service the following error occurred below.
I looked in the blog below about dynamic data sources, but I think I'm splitting the url wrong.
Web.Contents(), M Functions And Dataset Refresh Errors In Power BI
Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code
Data source example:
token_ = 0AFsf....
Source_fs = Json.Document(
Web.Contents(
"https://services.arcgis.com/Qo2anKIAMzIEkIJB/ArcGIS/rest/services/Middle_Output_Areas/FeatureServer/0/query?where=1%3D1&outFields=*&returnGeometry=false&f=json&token=",
[ApiKeyName=token_]
), 65001
),
features = Source_fs[features],
#"Converted to Table" = Table.FromList(features, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
How would my url partition look like?
RelativePath=?
Query=?
Any workarounds?
@Anonymous
What is the error message when you try? Try following, move the / to the relative path.
Source_fs = Json.Document(Web.Contents(
"https://services.arcgis.com",
[RelativePath="/Qo2anKIAMzIEkIJB/ArcGIS/rest/services/Middle_Output_Areas/FeatureServer/0/query",
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
I tried that way but it didn't work.
token_ = 0AFsf....
Source_fs = Json.Document(Web.Contents(
"https://services.arcgis.com/",
[
RelativePath="Qo2anKIAMzIEkIJB/ArcGIS/rest/services/Middle_Output_Areas/FeatureServer/0/query",
Query=[
where = "1%3D1",
outFields = "*",
returnGeometry = "false",
f = "json",
token = token_
]
]), 65001),
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.