<?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: Power BI Embedded Parameters and Filter in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Parameters-and-Filter/m-p/332345#M9837</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/48256"&gt;@kosmik5&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to use &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript" target="_self"&gt;PowerBI-JavaScript&lt;/A&gt;&amp;nbsp;API to&amp;nbsp;set filters with Power BI Embedded. For more details, you can refer to&amp;nbsp;&lt;SPAN&gt;PowerBI-JavaScript wiki &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_self"&gt;Filters&lt;/A&gt;.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;const filter = { ... };

report.setFilters([filter])
  .catch(errors =&amp;gt; {
    // Handle error
  });&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Sample of filters:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;const basicFilter: pbi.models.IBasicFilter = {
  $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Store",
    column: "Count"
  },
  operator: "In",
  values: [1,2,3,4]
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2018 06:59:03 GMT</pubDate>
    <dc:creator>v-ljerr-msft</dc:creator>
    <dc:date>2018-01-04T06:59:03Z</dc:date>
    <item>
      <title>Power BI Embedded Parameters and Filter</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Parameters-and-Filter/m-p/331811#M9826</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are developing a Power BI embedded app, where we have an Azure website containing a Power BI report, which is also uploaded to our Azure server.&lt;/P&gt;&lt;P&gt;I know I can set filter parameters in a &lt;STRONG&gt;&lt;FONT color="#000000"&gt;&lt;A href="http://kosmiktechnologies.com/power-bi-training-in-hyderabad/" target="_blank"&gt;Power BI&lt;/A&gt;&lt;/FONT&gt;&lt;/STRONG&gt; app embedded in an iframe, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function onFrameLoaded() {
var m = {
    action: "loadReport",
    reportId: reportId,
    accessToken: accessToken
};

iframe.contentWindow.postMessage(JSON.stringify(m), "*");&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works when you embed a Power BI report published on the web. But it doesn't work on Power BI Embedded. Is there a way to accomplish the same kind of filtering in Power BI Embedded?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;Hariprasad&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2018 11:53:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Parameters-and-Filter/m-p/331811#M9826</guid>
      <dc:creator>kosmik5</dc:creator>
      <dc:date>2018-01-03T11:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded Parameters and Filter</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Parameters-and-Filter/m-p/332345#M9837</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/48256"&gt;@kosmik5&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to use &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript" target="_self"&gt;PowerBI-JavaScript&lt;/A&gt;&amp;nbsp;API to&amp;nbsp;set filters with Power BI Embedded. For more details, you can refer to&amp;nbsp;&lt;SPAN&gt;PowerBI-JavaScript wiki &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_self"&gt;Filters&lt;/A&gt;.&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.fabric.microsoft.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;const filter = { ... };

report.setFilters([filter])
  .catch(errors =&amp;gt; {
    // Handle error
  });&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Sample of filters:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;const basicFilter: pbi.models.IBasicFilter = {
  $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Store",
    column: "Count"
  },
  operator: "In",
  values: [1,2,3,4]
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 06:59:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-Parameters-and-Filter/m-p/332345#M9837</guid>
      <dc:creator>v-ljerr-msft</dc:creator>
      <dc:date>2018-01-04T06:59:03Z</dc:date>
    </item>
  </channel>
</rss>

