Forum Discussion
Combining Tables from different data sources in Tabular Model
I have two different SQL server databases/data sources in my Tabular Model
I would like to combine two tables from two different sources (one table from each source) with the exact same design in my Tabular Model (NB!), but I am not sure if that is possible.
The graphical interface does not seem to support this, but I am wondering if it is possible with Advanced Editor/M/Power Query. The append function in the graphical interface does not seem to allow two tables from different sources
Sample Data:
DB's: Company1DB and Company2DB
Tables: Company1DB\FactData and Company2DB\FactData
Source 1
Company1DB\FactData table:
CompanyName Person Sales
A Peter 100
A Sue 200
Source 2
Company2DB\FactData table:
CompanyName Person Sales
B Peter 300
B Sue 400
Desired Result:
COMBINED TABLE
CompanyName Person Sales
A Peter 100
A Sue 200
B Peter 300
B Sue 400
In PQ, in a new Query, you can put following formula where you would need to replace Table1 and Table2 with respective query names
=Table.Combine({Table1, Table2})
9 Replies
- AnonymousNot applicable
hi Anonymous
I saw this response of yours on a similar posting. https://community.fabric.microsoft.com/t5/Developer/Tabular-Editor-Union-tables/m-p/2166059Is it possible to append tables from two different data source in the Power Query graphical interface using the import tables from source function. Can this be done using "Expressions" part of Tabular Model?
- Vijay_A_VermaMost Valuable Professional
In PQ, in a new Query, you can put following formula where you would need to replace Table1 and Table2 with respective query names
=Table.Combine({Table1, Table2})
- AnonymousNot applicable
How would you do this where the data source is different databases/files?
- Vijay_A_VermaMost Valuable Professional
The above is not dependent upon whether data source is same or different.