Forum Discussion
How to combine data from two different databases and keep the mode Direct query?
Hi anuragccsu ,
Power BI supports composite models, which allow you to combine DirectQuery and Import mode data. However, when you append data from different sources, it often defaults to Import mode. To maintain DirectQuery, you might need to use relationships instead of appending the tables directly. Or, for security reasons, you can switch unimportant data sources to import mode.
Use composite models in Power BI Desktop - Power BI | Microsoft Learn
Use DirectQuery in Power BI Desktop - Power BI | Microsoft Learn
Another solution is to create custom SQL views in one of your databases that pull data from the other database. For example, create a view in SQL Server that pulls data from Oracle using a linked server. Then, use this view in DirectQuery mode.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous thanks for your response. I need a combined(appended or unioned) table which i wanted to filter. This means that single column coming from two different databases needs to be filter simultaneously for values in those table. I think relation won't work here as it'll mean to get two columns from the two tables and put them side by side via a relation. I need values in a single column from both the tables. Say in your example SalesID is avaiable in both tables coming from two different data sources, a relation will only help to put them side side by but not as union! That's what i tried and understand now.
Composite model is something which means your model has tables in direct query as well as import mode. My requirements was different.
Thanks for your resonse.