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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Madunapa
New Member

Multiple API Calls into on table

Hey I have an issue with a project. We have platform for monitoring customers which they consume different licenses. For billing we need to pull out that data every month. That consist of pulling data from 7 different API's pr customer. The job is to consolidate all data 7 Calls x 300ish customers into one readable report to do billing. Columns: Customer, Month, Licenses Consumed. Some months a customer might not have consumed licenses from one or more of the API's which results in NULL and a different format of the tabel, which makes the consolidation troublesome as this is not consistant. 

 

Any ideas on how to approach this problem? I want to make a template for each call, making it easy to add all the different calls into power bi for all customers. 

 

Is it possible to do an IF in the advnaced editor with two different outcomes? E.g IF no data: (make "this let&in" table with 0 and the current month, instead of just NULL) ELSE make: "this let&in".

 

Or even better: is there a way to add all the calls into one query? Or 7 different queries with query 1 having all the api calls for license 1 and query 2 with all the calls for license 2 and so on...

 

I've read up on the community on this and there are some similar issues but it does'nt work especcially due to no data on some of the calls.

 

I'm really strugling here and i'm new to power BI. Let me know if there's any information i might add! Any help is much appriciated!

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

Not sure how similar the data/tables returned from your 7 different API calls, but this video should help with how to start with a table of values (customers and/or APIs) and concatenate them into a url in a Web.Contents call, and combine them.

Power BI - Tales From The Front - REST APIs - YouTube

 

For those that return no rows (your nulls), you can make a dummy table with #table( ) in a separate query (that has 0 values in your desired fields).  Prior to expanding the tables returned by the web calls, you can add an if Table.RowCount([ColumnWithTables])>0 then [ColumnWithTables] else dummytable, and then expand that new column of tables to get your desired result.

 

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


Great video! Is it possible to share a link to the PowerBI file demonstrated in the video? 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors