<?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 in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/power-bi-embedded/m-p/216237#M6808</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/32190"&gt;@chotu27&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am integrating power bi to my web application , So i have 5 Types diffrent stores which are able to select from application that stores are also available in my dataset in power bi . So now i need wheather we can pass the parameters from application to power bi to filter according to stores selected from the application .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible&lt;BR /&gt;??????????????????&amp;nbsp;&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/32190"&gt;@chotu27&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;It is possible, you could use the &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript" target="_self"&gt;Power BI Javascript API&lt;/A&gt;, see &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_self"&gt;Filters&lt;/A&gt;. A demo for your reference. Note that the table name and column name are case sensitive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;script src="JQuery.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () {
 // Read embed application token from Model
    var accessToken = "H4sIAAxxxxxxxxxxxxxuoLAAA=";

    // Read embed URL from Model
    var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=5146cfxxxxxa469caab581&amp;amp;groupId=dc581184-xxxx32f16b6c15";

    // Read dashboard Id from Model
    var embedReportId = "51xxxaab581";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Embed configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
	
	&lt;STRONG&gt; var  filter1 = {
   $schema: "http://powerbi.com/product/schema#advanced",
  target: {
    table: "Table1",
    column: "storename"
  },
  logicalOperator: "OR",
  conditions: [
    {
      operator: "Contains",
      value: "store1"
    } 
  ]
}&lt;/STRONG&gt;

    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,	
	&lt;STRONG&gt;filters:[filter1], // the filters is an array here, you can add more filter like [filter1,filter2,filter3]
	settings: {
                filterPaneEnabled: true //hide the filterPane so that your user can't change the filter to see more data, this is not a strong security, anyone who's familar with javascript can bypass it
		}&lt;/STRONG&gt;
    };

    // Get a reference to the embedded dashboard HTML element
    var dashboardContainer = $('#reportContainer')[0] ;

    // Embed the dashboard and display it within the div container.
    var dashboard = powerbi.embed(dashboardContainer, config);
 
}
 
 
&amp;lt;/script&amp;gt; 
 
&amp;lt;div id="reportContainer"&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;  &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2017 05:51:58 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-07-21T05:51:58Z</dc:date>
    <item>
      <title>power bi embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/power-bi-embedded/m-p/215098#M6804</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am integrating power bi to my web application , So i have 5 Types diffrent stores which are able to select from application that stores are also available in my dataset in power bi . So now i need wheather we can pass the parameters from application to power bi to filter according to stores selected from the application .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible&lt;BR /&gt;??????????????????&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 20:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/power-bi-embedded/m-p/215098#M6804</guid>
      <dc:creator>chotu27</dc:creator>
      <dc:date>2017-07-19T20:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: power bi embedded</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/power-bi-embedded/m-p/216237#M6808</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/32190"&gt;@chotu27&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am integrating power bi to my web application , So i have 5 Types diffrent stores which are able to select from application that stores are also available in my dataset in power bi . So now i need wheather we can pass the parameters from application to power bi to filter according to stores selected from the application .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible&lt;BR /&gt;??????????????????&amp;nbsp;&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/32190"&gt;@chotu27&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;It is possible, you could use the &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript" target="_self"&gt;Power BI Javascript API&lt;/A&gt;, see &lt;A href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_self"&gt;Filters&lt;/A&gt;. A demo for your reference. Note that the table name and column name are case sensitive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;html&amp;gt;

&amp;lt;script src="JQuery.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;script src="powerbi.js"&amp;gt;&amp;lt;/script&amp;gt;

&amp;lt;script type="text/javascript"&amp;gt;
window.onload = function () {
 // Read embed application token from Model
    var accessToken = "H4sIAAxxxxxxxxxxxxxuoLAAA=";

    // Read embed URL from Model
    var embedUrl = "https://app.powerbi.com/reportEmbed?reportId=5146cfxxxxxa469caab581&amp;amp;groupId=dc581184-xxxx32f16b6c15";

    // Read dashboard Id from Model
    var embedReportId = "51xxxaab581";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Embed configuration used to describe the what and how to embed.
    // This object is used when calling powerbi.embed.
    // This also includes settings and options such as filters.
    // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details.
	
	&lt;STRONG&gt; var  filter1 = {
   $schema: "http://powerbi.com/product/schema#advanced",
  target: {
    table: "Table1",
    column: "storename"
  },
  logicalOperator: "OR",
  conditions: [
    {
      operator: "Contains",
      value: "store1"
    } 
  ]
}&lt;/STRONG&gt;

    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,	
	&lt;STRONG&gt;filters:[filter1], // the filters is an array here, you can add more filter like [filter1,filter2,filter3]
	settings: {
                filterPaneEnabled: true //hide the filterPane so that your user can't change the filter to see more data, this is not a strong security, anyone who's familar with javascript can bypass it
		}&lt;/STRONG&gt;
    };

    // Get a reference to the embedded dashboard HTML element
    var dashboardContainer = $('#reportContainer')[0] ;

    // Embed the dashboard and display it within the div container.
    var dashboard = powerbi.embed(dashboardContainer, config);
 
}
 
 
&amp;lt;/script&amp;gt; 
 
&amp;lt;div id="reportContainer"&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/html&amp;gt;  &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 05:51:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/power-bi-embedded/m-p/216237#M6808</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-07-21T05:51:58Z</dc:date>
    </item>
  </channel>
</rss>

