Forum Discussion
Can we query Data model in Power BI with complex SQL instead of drag and drop table columns
- Anonymous2 years ago
Hi nibitbabu ,
Base on your description, it seems that you want to load multiple queries into Power BI base on one SQL statement. However, currently Power BI doesn't support this feature. You can refer the following official documentation to load one query first:
Import data from a database using native database query - Power Query | Microsoft Learn
-
Connect to a SQL Server database using Power Query. Select the SQL Server database option in the connector selection.
-
In the SQL Server database popup window:
1).Specify the Server and Database where you want to import data from using native database query.2).Under Advanced options, select the SQL statement field and paste or enter your native database query, then select OK.
Then you can repeat the above steps for each SQL statement you want to load in Power Query.
Best Regards
-
Thanks @tachytechtom, I believe you got my question exactly i.e. how to use sql queries against semantic model in Power BI to generate reports and there does not seem to be a stright forward solution.
Is ther any way to atleast import mutiple data Queries(Power BI) using one connection. i.e. after connecting to the database once. I want to import all the complex SQL queries/reports at once without doing a connection to the source for individual queries.
- Anonymous2 years agoNot applicable
Hi nibitbabu ,
Base on your description, it seems that you want to load multiple queries into Power BI base on one SQL statement. However, currently Power BI doesn't support this feature. You can refer the following official documentation to load one query first:
Import data from a database using native database query - Power Query | Microsoft Learn
-
Connect to a SQL Server database using Power Query. Select the SQL Server database option in the connector selection.
-
In the SQL Server database popup window:
1).Specify the Server and Database where you want to import data from using native database query.2).Under Advanced options, select the SQL statement field and paste or enter your native database query, then select OK.
Then you can repeat the above steps for each SQL statement you want to load in Power Query.
Best Regards
-