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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Mister_PowerBI
Frequent Visitor

Combining 20 identical tables without using APPEND

Hello, 

 

I have a client who uses software that creates the exact same database structure for each of their legal entities. In total, there are 20 databases. I want to combine data from these 20 databases into ONE Power BI table without using append. 

 

I have created a Power Query function that loops through each database and pulls the data, next a I can extract the data. The only thing is that in the Power BI Service, I can't get this to work. The service constantly wants me to specify a datasource with a 'null' database, but it's not allowed to leave this field open.

 

Concluding: in Power BI Desktop this is working fine but Power BI Service is giving me a lot of trouble. Is there an easier way to combine this data in Power BI without appending 20 tables? 

 

 

1 REPLY 1
BA_Pete
Super User
Super User

Hi @Mister_PowerBI ,

 

The obvious question is: Why don't you want to append them?

Appending isn't a particularly resource-intensive operation and, once combined and sent to the data model, this data structure will be significantly more efficient than the alternative.

 

However, there is an alternative.

-1- Create null-handled queries for each separate source. Chris Webb gives good examples of what I mean

here: https://blog.crossjoin.co.uk/2015/07/03/ensuring-columns-are-always-present-in-a-table-returned-by-p... 

and here: https://blog.crossjoin.co.uk/2014/09/18/handling-data-source-errors-in-power-query/ 

Make sure to read the comments at the end of the posts as some users have contributed important updates to the blog process.

-2- Create dimension tables for all common dimensions and relate these to all 20 queries in the data model.

-3- Create query-specific measures against each query. For example:

sales_a = SUM(queryA[Sales])
sales_b = SUM(queryB[Sales])
sales_total = sales_a + sales_b
... etc.

 

-4- When visualising, ensure that you use the common dimension table fields to populate the visual, before adding query-specific fact measures. This should then work as required.

 

Unfortunately, you'll need to create many dimension tables, and 20 measures per fact calculation - 1 per query per calculation. You'll also have very inefficient compression due to the separated queries and the addition of all the dimension tables and subsequent relationships. As above, it's far more efficient to append.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors