Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Can we query or build a report from Power BI Data model ( already loaded using Get data ) with SQL statements already.
It seems like sql can be used only to load data into the Power BI model using DirectQuery--> Advanced options.
Solved! Go to Solution.
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.
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
Hi @nibitbabu ,
Not sure, whether I fully got your question, but I'll give it a try 🙂
I do not think you can use SQL to directly query the semantic model, but there are ways to shoot queries i.e. by using the ExecuteQueries API (https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries) or by using the new semantic link (What is semantic link (preview)? - Microsoft Fabric | Microsoft Learn). With the latter, I guess you could use some kind of sql dialect on top of dataframes.
Hope this helps at least a bit 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
4 | |
4 | |
4 | |
4 | |
4 |