Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

No columns found

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

1 ACCEPTED 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!!

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Greg_Deckler
Super User
Super User

@ImkeF @edhans @HotChilli @dm-p 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

 

image.png

 

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?

Anonymous
Not applicable

It worked with JDBC connection. Not sure why it does not work with ODBC connection in Power BI desktop

Anonymous
Not applicable

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

Anonymous
Not applicable

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!!

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors