<?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 Power BI Embedded - DirectQuery dynamic parameters in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/306061#M9004</link>
    <description>&lt;P&gt;I would like to be able to embed Power BI report, and be able to do a DirectQuery against my datasource based on the currently logged in user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I've been able to get this to work is to use the Username function in DAX, but by the time DAX is available, I'd have already had to load WAY too much data (not relevent data) into my model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I filter at the PowerQuery?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2017 19:38:20 GMT</pubDate>
    <dc:creator>trevorgermain</dc:creator>
    <dc:date>2017-11-17T19:38:20Z</dc:date>
    <item>
      <title>Power BI Embedded - DirectQuery dynamic parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/306061#M9004</link>
      <description>&lt;P&gt;I would like to be able to embed Power BI report, and be able to do a DirectQuery against my datasource based on the currently logged in user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only way I've been able to get this to work is to use the Username function in DAX, but by the time DAX is available, I'd have already had to load WAY too much data (not relevent data) into my model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I filter at the PowerQuery?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2017 19:38:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/306061#M9004</guid>
      <dc:creator>trevorgermain</dc:creator>
      <dc:date>2017-11-17T19:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded - DirectQuery dynamic parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/306574#M9016</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19717"&gt;@trevorgermain&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I would like to be able to embed Power BI report, and be able to do a DirectQuery against my datasource based on the currently logged in user.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The only way I've been able to get this to work is to use the Username function in DAX,&lt;/STRONG&gt; but by the time DAX is available, I'd have already had to load WAY too much data (not relevent data) into my model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I filter at the PowerQuery?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/19717"&gt;@trevorgermain&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;That is the only approach possible I'm aware of. As to "load too much data", you may don't worry about that. Because in DirectQuery mode, it doesn't load all data from database and then apply a filter. Instead, Power BI composes a proper SQL with the filter and send the SQL to database. Eg. in my test, I capture the below in my test with SQL Server profiler, the WHERE clause is appended due to USERNAME() filter.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 414px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/70322i6985B17515233945/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 06:41:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/306574#M9016</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-11-20T06:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded - DirectQuery dynamic parameters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/307017#M9034</link>
      <description>&lt;P&gt;I've been mostly using Import mode, and have a new requirement where DirectQuery may make the most sense. Thank you for your response. I tried the exact thing you suggested and am seeing proper filtering on the query in SQL Profiler.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 16:03:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-DirectQuery-dynamic-parameters/m-p/307017#M9034</guid>
      <dc:creator>trevorgermain</dc:creator>
      <dc:date>2017-11-20T16:03:32Z</dc:date>
    </item>
  </channel>
</rss>

