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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
bestebaranz
Advocate I
Advocate I

Web Service

Till this moment I've been extracting data from an ERP through and SQL Server but now I need to extract data from a web Service.

How can I do it?  If I use import data from a web page I have to write  a range of date and I can't update it out of that date.

I would appreciate if you could give me indications for Dummies, I'm not a developer.

 

Thanks a lot for your help.

 

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@bestebaranz

 

In Power BI Desktop, to get data from web service, you can use Web.Content() function to call the web service and retrieve the data. Please refer to Chris Webb's blog:

 

Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code

 

Regards,

Thank you for your link but I'm afraid this is a little more complicated that the example.

I have to extract the data from a web Service, It only allows to extract the last month. I know I have to make a loop, there are data from 01-12-2012, how can I modify this to extract the rest of the info.

How can I transform this instruction to get data from a different date?

 

let
Source = Xml.Tables(Web.Contents("http://-----------/ExportacionDAtos/service.asmx/GetTicket?IDTicket=0&IDTerminal=0&IDEstablecimiento=0&Desde=2017-01-01&Hasta=2017-01-31")),
Table0 = Source{0}[Table],
#"Changed Type" = Table.TransformColumnTypes(Table0,{{"ID_TICKET", Int64.Type}, {"ID_ESTABLECIMIENTO", Int64.Type}, {"ESTABLECIMIENTO", type text}, {"ID_TERMINAL", Int64.Type}, {"TERMINAL", type text}, {"ID_USUARIO", Int64.Type}
in
#"Changed Type"

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.