Forum Discussion
Web Service
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,
- bestebaranz9 years agoAdvocate I
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"