<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can we query Data model in Power BI with complex SQL instead of drag and drop table columns in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3606537#M46774</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/657781"&gt;@nibitbabu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/native-database-query" target="_blank"&gt;Import data from a database using native database query - Power Query | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Connect to a SQL Server database using Power Query. Select the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL Server database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option in the connector selection.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="3"&gt;In the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL Server database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;popup window:&lt;/FONT&gt;&lt;/P&gt;
&lt;FONT size="3"&gt;1).Specify the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Server&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;where you want to import data from using native database query.&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size="3"&gt;2).Under&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Advanced options&lt;/STRONG&gt;, select the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL statement&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field and paste or enter your native database query, then select&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;OK&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1703832571088.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1017373i4A11BA1616FF4C9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1703832571088.png" alt="vyiruanmsft_0-1703832571088.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Then you can repeat the above steps for each SQL statement you want to load in Power Query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_1-1703832830746.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1017375i22572E8DB1D61D91/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_1-1703832830746.png" alt="vyiruanmsft_1-1703832830746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Fri, 29 Dec 2023 06:54:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-12-29T06:54:27Z</dc:date>
    <item>
      <title>Can we query Data model in Power BI with complex SQL instead of drag and drop table columns</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573361#M45692</link>
      <description>&lt;P&gt;Can we query or build a report from Power BI Data model ( already loaded using Get data ) with SQL statements already.&lt;BR /&gt;It seems like sql can be used only to load data into the Power BI model using DirectQuery--&amp;gt; Advanced options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 20:49:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573361#M45692</guid>
      <dc:creator>nibitbabu</dc:creator>
      <dc:date>2023-12-07T20:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can we query Data model in Power BI with complex SQL instead of drag and drop table columns</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573428#M45694</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/657781"&gt;@nibitbabu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure, whether I fully got your question, but I'll give it a try &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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 (&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/execute-queries&lt;/A&gt;) or by using the new semantic link (&lt;A href="https://learn.microsoft.com/en-us/fabric/data-science/semantic-link-overview" target="_blank"&gt;What is semantic link (preview)? - Microsoft Fabric | Microsoft Learn&lt;/A&gt;). With the latter, I guess you could use some kind of sql dialect on top of dataframes.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps at least a bit &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Tom&lt;BR /&gt;&lt;A href="https://www.tackytech.blog/" target="_blank"&gt;https://www.tackytech.blog/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.instagram.com/tackytechtom/" target="_blank"&gt;https://www.instagram.com/tackytechtom/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 21:50:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573428#M45694</guid>
      <dc:creator>tackytechtom</dc:creator>
      <dc:date>2023-12-07T21:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can we query Data model in Power BI with complex SQL instead of drag and drop table columns</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573460#M45695</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;@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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 22:07:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3573460#M45695</guid>
      <dc:creator>nibitbabu</dc:creator>
      <dc:date>2023-12-07T22:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can we query Data model in Power BI with complex SQL instead of drag and drop table columns</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3606537#M46774</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/657781"&gt;@nibitbabu&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-query/native-database-query" target="_blank"&gt;Import data from a database using native database query - Power Query | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Connect to a SQL Server database using Power Query. Select the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL Server database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;option in the connector selection.&lt;/FONT&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;FONT size="3"&gt;In the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL Server database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;popup window:&lt;/FONT&gt;&lt;/P&gt;
&lt;FONT size="3"&gt;1).Specify the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Server&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Database&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;where you want to import data from using native database query.&lt;/FONT&gt;
&lt;P&gt;&lt;FONT size="3"&gt;2).Under&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Advanced options&lt;/STRONG&gt;, select the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;SQL statement&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field and paste or enter your native database query, then select&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;OK&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1703832571088.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1017373i4A11BA1616FF4C9C/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1703832571088.png" alt="vyiruanmsft_0-1703832571088.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Then you can repeat the above steps for each SQL statement you want to load in Power Query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_1-1703832830746.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1017375i22572E8DB1D61D91/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_1-1703832830746.png" alt="vyiruanmsft_1-1703832830746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 29 Dec 2023 06:54:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Can-we-query-Data-model-in-Power-BI-with-complex-SQL-instead-of/m-p/3606537#M46774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-12-29T06:54:27Z</dc:date>
    </item>
  </channel>
</rss>

