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

View all the Fabric Data Days sessions on demand. View schedule

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
Community Champion
Community Champion

@ImkeF @edhans @HotChilli @dm-p 



Follow on LinkedIn
@ 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!:
DAX For Humans

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors