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.
I am using Web.Contents and I have the below Invoked Custom Function. It says no columns found when I expand the Invoked Custom Function. What am I doing wrong.
let a = (northing as number, easting as number) =>
let Source = Json.Document(Web.Contents( "http://www.bgs.ac.uk/data/webservices/CoordConvert_LL_BNG.cfc?method=BNGtoLatLng",
[ Query= [ easting=Text.From(easting), northing=Text.From(northing) ] ] ) )
in Source
in a
Solved! Go to Solution.
Hi @Anonymous ,
Glad you have resolved it. 😉 You could accept your answer as solution. Others who have the same questions will benefit from this thread. Thanks!!
@ImkeF @edhans @HotChilli @dm-p
Hi @Anonymous ,
Did you try the query with hardcoded values instead? If that worked, you have to use a tool like Fiddler to see what query both of your versions actually send to the interweb and compare them.
If you cannot solve the problem by yourself, please post the code that both queries returned here in the post so that I can follow up.
If even the hardcoded version didn't work, you have to find another means that creates a valid query to get the string to compare against. A tool like Postman could help you with it.
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
I couldn't get it to fail. What values are you passing to the function?
It worked with JDBC connection. Not sure why it does not work with ODBC connection in Power BI desktop
Was lucky as I had set up 2 connections ODBC and JDBC
Code 1 works fine in Power Bi desktop but cannot refresh in the app had error Web.Contents
let a = (easting1 as number, northing1 as number) =>
let
Source = Json.Document(Web.Contents("http://www.bgs.ac.uk/data/webservices/CoordConvert_LL_BNG.cfc?method=BNGtoLatLng&easting="&Text.From...""))
in
Source
in a
Second Code does not bring in the data with ODBC connection Works with JDBC No error but does not bring in the columns
let a = (northing as number, easting as number) =>
let
Source = Json.Document(Web.Contents(
"http://www.bgs.ac.uk/data/webservices/CoordConvert_LL_BNG.cfc?method=BNGtoLatLng",
[
Query=
[
easting=Text.From(easting),
northing=Text.From(northing)
]
]
)
)
in
Source
in a
I got it working I think it is something to do with the URL.
Thanks for the replies guys
Hi @Anonymous ,
Glad you have resolved it. 😉 You could accept your answer as solution. Others who have the same questions will benefit from this thread. Thanks!!
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.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |