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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
asjam86
Frequent Visitor

Web based XML Query dynamic values

Hi all,

 

 

We run a 3rdparty system which I can get information from via XML as well as the GUI. I would like to use this to bring in information into PowerBi. The way I access the data is through an XML query string.

https://3rdpartyapp.com/API-Token=123456?QUERYSTRING

 

I would like to obtain information about a customers address I need to input the clientID...

https://3rdpartryapp.com/API-Token=123456?Client_Address&ClientID=09876

 

The problem is I want this information for all my clients at the same time and not choose 1 at a time. I looked at using parameter query and where by I could update the query being run to return by results what I would like to do is run the query against all ClientID's which I have stored in another dataset in PowerBi. 

 

Any help would be appricated as I'm sure my brain is turning a slight yellow and black colour. 

 

Many thanks

Justin

1 REPLY 1
Anonymous
Not applicable

You can do this with some M. You need to start with a list of your client IDs, and from there you can do a simple List.Transform to iterate out all the URLs you want to hit.

 

For example, if I have:

Identifiers = 
    let
        x = {1..20}
    in
        x;

Test = 
    let
        Source = List.Transform(Identifiers, 
            each "http://api.population.io/1.0/population/1980/" & "United States" & "/" & Text.From(_) & "/")
    in
        Source;

Calling "Test" will show a list of the URLs:

 

devenv_2017-07-24_12-14-05.png

 

 

From here, I know we can call Json.Document(Web.Contents(url)) on each one, (or Xml.Document() in your case). So in Power BI, I can use the Advanced Editor feature to create this. On both of these tables, I'm starting with "Blank Query", but you might already have your Client IDs. Make sure you isolate those to a List, rather than a table.

 

PBIDesktop_2017-07-24_12-18-34.png

 

PBIDesktop_2017-07-24_12-19-32.png

 

I used the GUI to "cheat" here and autogenerate those last 3 lines to extract the values out of the JSON objectsI used the GUI to "cheat" here and autogenerate those last 3 lines to extract the values out of the JSON objects

 

I hope this sets you down the right track. Basically, you're looking to generate URLs and just pass each one to a Web content function, and then an XML parsing function.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.