Forum Discussion

nibitbabu's avatar
nibitbabu
New Member
2 years ago
Solved

Can we query Data model in Power BI with complex SQL instead of drag and drop table columns

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 D...
  • Anonymous's avatar
    Anonymous
    2 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


    1. Connect to a SQL Server database using Power Query. Select the SQL Server database option in the connector selection.

    2. 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