Forum Discussion
How to bring two different table in One query
Hi,
Yes, it is possible to bring two different tables from your Oracle database into Power BI using a single DirectQuery.
To do this, you can create a SQL query that joins the two tables together and then use this query as the basis for your DirectQuery connection in Power BI. Here are the general steps:
Write a SQL query that joins the two tables together. The query should include all the fields you want to bring into Power BI.
In Power BI Desktop, select "Get Data" and choose "Oracle database" as the data source.
In the "Oracle database" dialog, select "DirectQuery" as the connectivity mode.
In the "Navigator" window, select "Advanced options" and enter your SQL query in the "SQL statement" field.
Click "OK" to create the connection.
Once the connection is established, you will see a single table in the Fields pane of Power BI Desktop that includes all the fields from your SQL query.
You can then use this table to create visualizations and reports in Power BI.
Note that in order for this to work, both tables must be in the same database schema and you must have permissions to query both tables. Additionally, performance may be affected if the joined table is very large, so you may want to consider using other techniques like data modeling or filtering to optimize your query.