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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
SanderVeeken
Helper III
Helper III

API call in custom column

Hi all,

 

I'm working with an API that first gives me a basic list of products with ID, and then I can use this product ID to make further API calls to get more information about each product. With something like Python, this is very straightforward. This is the first time I've tried to do this in PowerQuery and I figured it would be as simple as adding a custom column and putting the API call in there. Simplest version:

 

#"GETextrainfo"=Table.AddColumn(#"previous step", "extrainfo", each Json.Document(Web.Contents(#"API_PATH" & Text.From([id]) & "?Endpoint-Access-Token=" & #"Endpoint-Access-Token")))

 

However, no matter how I phrase this function, I get an error:

Formula.Firewall: Query 'Query1' (step 'GETextrainfo') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.

 

No other queries are referenced, the only step that is referenced is the previous one which is normal. So it must be a problem making this API call in a column? How then would I do it? I'm not a star in M Language, but it seems so simple and it's driving me crazy that it doesn't work.

1 REPLY 1
lbendlin
Super User
Super User

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors