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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
KimRexh
Regular Visitor

Multiple API URL

Hi!
I have 4 URLS that I want to get data from, and the 1st url does always contain data but not the 3 other ones. Sometimes they have data and sometimes not.

So Im wondering if its possible to add all 4 api urls in one query and "Skip" if callout does not contain data?

Setup today is that I get an error "could not find column..." When the other urls dont have data.

 

How can I solve this?

Thanks in advance

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @KimRexh 

 

Another method is that you can create an empty table with only column names which are the same as columns from that API. Then append this empty table with the table queried from API. When API doesn't return any data, the table after appending is still an empty table with column names. It will not return error "could not find column..." because it has that column although there is no data there. 

22011901.jpg

let
    Source = APItable, 
    emptyTable = #table({"Name","ID","Date"},{}),
    #"Appended Query" = Table.Combine({Source, emptyTable})
in
    #"Appended Query"

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @KimRexh 

 

Another method is that you can create an empty table with only column names which are the same as columns from that API. Then append this empty table with the table queried from API. When API doesn't return any data, the table after appending is still an empty table with column names. It will not return error "could not find column..." because it has that column although there is no data there. 

22011901.jpg

let
    Source = APItable, 
    emptyTable = #table({"Name","ID","Date"},{}),
    #"Appended Query" = Table.Combine({Source, emptyTable})
in
    #"Appended Query"

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

mahoneypat
Microsoft Employee
Microsoft Employee

You can create a one-column table with your 4 urls in each row, and then add

 

= try Web.Contents([URLcolumn]) otherwise null

 

in a custom column. You can then filter out the null rows and then expand your content.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.