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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
bebeto
Helper III
Helper III

Calling web service from Power BI Desktop

Hello,

 

I hace some files with location data (latitude, longitude) in them. In my multidimensional solution, when I do the ETL with SSIS I have an script task which call a bing maps web service (https://msdn.microsoft.com/es-es/library/ff701710.aspx) passing latitude and longitude as parameters. The resulting data is added to my cube.

 

I want to do thse same in Power BI, can I do it?

6 REPLIES 6
Greg_Deckler
Super User
Super User

You might be able to get there with some fancy "M" coding:

https://msdn.microsoft.com/library/Mt253322?ui=en-US&rs=en-US&ad=US

 

What is the purpose/use of the information? Is it to plot the location or is there some other information coming back? I tried your link. With my limited ability to read what I believe is Spanish, it looked like an error "page not found".



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

The purpose is get information about the adress passing a point (latitude, longitude).

 

Here is the link:

 

https://msdn.microsoft.com/es-es/library/ff701710.aspx

Another option might be to use R Script. File | Options and Settings | Options | R Script to enable.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Using R or M I can call a web service passing parameters using data form my data model?

 

Any example?

Haven't really played around with R in that context. M does have a category of functions called "Access data functions":

https://msdn.microsoft.com/en-us/library/mt296615.aspx

 

There are a number of options and the specific answer is going to depend on the type of web service. You can definitely use M to build something like a web service URL using static text plus columns/fields from your data. So, I could imagine a custom column in the query that concatenated the appropriate URL per location and then an M function to grab the data and add it as custom colums to each row.

 

In general, Power BI typically is not used in this dynamic fashion but rather you connect to a data source, import the data and build the model. That being said, a very interesting use case here and would make a good blog article.

 

 



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thanks for your ideas, smoupre!

 

If I get the solution I will post here anyway.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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