<?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: Javascript api in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602125#M18249</link>
    <description>&lt;P&gt;Ok Ted, Thanks that eliminates one avenue of figuring it out. I'll take a closer look at Fiddler, will all the excitiment of getting up and going with this I've not yet got down and dirty with Fiddler.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 14:57:40 GMT</pubDate>
    <dc:creator>GJDealogic</dc:creator>
    <dc:date>2019-01-16T14:57:40Z</dc:date>
    <item>
      <title>Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/600021#M18215</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a web developer new to PowerBI. The team I am in looks after the company CRM which includes financial and analytics data. We are starting to use PowerBI to embed reports in our pages. Across the site we have a common theme with our own filters, dropdowns, customised date pickers etc. We want to keep a consistant look and feel and use these custom filters in conjunction with the embedded report so need to know&amp;nbsp;&lt;/P&gt;&lt;P&gt;a) If this is possible - I'm assuming it is&lt;/P&gt;&lt;P&gt;b) How to use the javascript api to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone point me in the direction of some examples and relevant documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jan 2019 10:20:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/600021#M18215</guid>
      <dc:creator>GJDealogic</dc:creator>
      <dc:date>2019-01-14T10:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601091#M18231</link>
      <description>&lt;P&gt;It is not clear to me what you are asking. Are you trying to match up the styling of what is inside the report with report themes with the UI experience you have created next to the report on the hosting page?&amp;nbsp;Or are you asking whether the UI experience you have built outside of a Power BI embedded report and interact with the report and apply filters interactively?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 13:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601091#M18231</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2019-01-15T13:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601758#M18239</link>
      <description>&lt;P&gt;Hi Gary,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer to &lt;A href="https://microsoft.github.io/PowerBI-JavaScript/demo/v2-demo/index.html#" target="_self"&gt;the live demo&lt;/A&gt;. It would be easy for you with the demo.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://ibb.co/XtkKwL3" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/c1414e8b27dd66d6f60c9a4e9d3da5947a982075/68747470733a2f2f692e6962622e636f2f31544a505351642f4a6176617363726970742d6170692e706e67" border="0" alt="Javascript-api" /&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 07:23:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601758#M18239</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2019-01-16T07:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601860#M18243</link>
      <description>&lt;P&gt;Hi Ted,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes to interact with the report. We use kendo ui controls on our pages and have customised them to our own liking eg our Client dropdown has selections&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All Clients&lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;My Clients&lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;EMEA Clients&lt;/P&gt;&lt;P&gt;APAC CLients&lt;/P&gt;&lt;P&gt;-----------&lt;/P&gt;&lt;P&gt;Client 1&lt;/P&gt;&lt;P&gt;Client 2&lt;/P&gt;&lt;P&gt;etc etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Id want to select one of those options and then (depending on what client id(s) the selection resolves to in our code) filter the embedded repport by either 1 or more clients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 09:08:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601860#M18243</guid>
      <dc:creator>GJDealogic</dc:creator>
      <dc:date>2019-01-16T09:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601994#M18244</link>
      <description>&lt;P&gt;Yes, you can set filters uisng JavaScript and your kendo UI controls. Begin by embedding a report&amp;nbsp;by calling&amp;nbsp;&lt;STRONG&gt;powerbi.embed&lt;/STRONG&gt; and holding on to the reference to the report object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var config = {
  type: 'report',
  id: embedReportId,
  embedUrl: embedUrl,
  accessToken: accessToken,
  tokenType: models.TokenType.Embed
};

// Get a reference to the embedded report HTML element
var embedContainer = document.getElementById('embedContainer');

// Embed the report and display it within the div container.
var report = powerbi.embed(embedContainer, config);&lt;/PRE&gt;&lt;P&gt;After that, you can set a filter on the embedded report&amp;nbsp;by calling&amp;nbsp;&lt;STRONG&gt;report.setFilters&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let states = ["FL","GA","NC"]

const basicStateFilter = {
  $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Customers",
    column: "State"
  },
  operator: "In",
  values: states
}

// apply filter to report
report.setFilters([basicStateFilter]);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 11:50:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/601994#M18244</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2019-01-16T11:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602053#M18245</link>
      <description>&lt;P&gt;Got it! I'm Away. many thanksTed!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing. Perfomance. When I first load my .cshtnl page with the embedded report it flashed the power BI icon and the report loads into the iFram moments later. If I f5 the page to refresh the page reload but there is often a wait of up to a few mins for the emmeded report to load. Why the delay, it is that i'm just in dev and have to wait for powerBI.com to deliver me the report and if I had some dedicated capacity I'd get a quicker return?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Gary&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 13:30:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602053#M18245</guid>
      <dc:creator>GJDealogic</dc:creator>
      <dc:date>2019-01-16T13:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602118#M18248</link>
      <description>&lt;P&gt;There are many reason why you might get this type of performance hit when refreshing a page with an embedded object but I cannot really say what you issue is. I would try using fiddler to see if the hold up is with&amp;nbsp;acquirng the access token from Azure AD or calling the Power BI Service API to retrieve embed tokens and embedding data for a report. However, you should NOT ever require a dedicated capacity when developing. I don't think&amp;nbsp;moving the Power BI report you are embedding into a app workspace in a dedicated capacity will speed things up as I suspect your performance issues lie elsewhere.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 14:51:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602118#M18248</guid>
      <dc:creator>TedPattison</dc:creator>
      <dc:date>2019-01-16T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript api</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602125#M18249</link>
      <description>&lt;P&gt;Ok Ted, Thanks that eliminates one avenue of figuring it out. I'll take a closer look at Fiddler, will all the excitiment of getting up and going with this I've not yet got down and dirty with Fiddler.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 14:57:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Javascript-api/m-p/602125#M18249</guid>
      <dc:creator>GJDealogic</dc:creator>
      <dc:date>2019-01-16T14:57:40Z</dc:date>
    </item>
  </channel>
</rss>

