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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

How to call XML API call using cell value

Hello everyone. 

 I need to make an XML API call to the web. As you can see the only thing that changes is the typeID= Number XXXX

 

pq2.png

 

On my main table i have a few TypeIDs (Column E)  that are the ones i need to use to their own API call. I would like to grab those numbers and dynamically change the last part of the api call (&type=XXX) to call each API. Info that's grabbed on the API call needs to get printed on column F (below "Jita").

If i can make all the API calls at once that would be ok too, but keep in mind than TypeIDs are probably gonna be changed with some checkbox.

 

pq1.png

2 REPLIES 2
lbendlin
Super User
Super User

If your TypeID column is part of a defined table then you can use the each operator to iterate through the list an call your XMLdownload function, like so:

 

Table.AddColumn(PreviousStep,"XML", each GetXML([TypeID]))

Anonymous
Not applicable

Exactly...my TypeID column is the one that i would manually input with whatever values i want to lookup for. Why?

 

https://api.evemarketer.com/ec/marketstat?typeid=34

 

As you can see...the red number will change whatever XML call information i get. 

To be honest, never did a foreach or anything related to it on PQ.

 

As you can see on my XML call, first row called named is the one who matches with TypeID column. Obviously i'm doing the calls manually typing each TypeID.

 

pq3.png

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.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.