<?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 embedding - Set and replace filters at embed time (config object) in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3425378#M44395</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/613896"&gt;@nazanael1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'd like to suggest you try to use the bookmark feature to saving these filter effect, then you can use this bookmarks to restore the filter to specific status instead of use setfilter interface.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/report-bookmarks" target="_blank"&gt;Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2023 02:45:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-12T02:45:30Z</dc:date>
    <item>
      <title>Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3419899#M44327</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are trying to embed a Power BI report into our web application. That report has a filter that we want to overwrite at embedding time.&lt;/P&gt;&lt;P&gt;We want to use the &lt;A href="https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/powerbi-client.models.reportonloadfilters" target="_blank" rel="noopener"&gt;OnLoadFilters&lt;/A&gt; interface from &lt;A href="https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/powerbi-client.models.ireportembedconfiguration" target="_blank" rel="noopener"&gt;IReportEmbedConfiguration&lt;/A&gt;, because it gives us the possibility to replace the current filter with the new one using the &lt;STRONG&gt;allPages&lt;/STRONG&gt; section.&lt;/P&gt;&lt;P&gt;We do not want to use the setFilters after the report is loaded as it has bad performance in our case.&lt;/P&gt;&lt;P&gt;The problem is that it is not working. We want to set filters and replace the current ones in embedding time, using the config.&lt;/P&gt;&lt;P&gt;Is there any way to solve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 14:43:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3419899#M44327</guid>
      <dc:creator>nazanael1</dc:creator>
      <dc:date>2023-09-07T14:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3425378#M44395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/613896"&gt;@nazanael1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'd like to suggest you try to use the bookmark feature to saving these filter effect, then you can use this bookmarks to restore the filter to specific status instead of use setfilter interface.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/report-bookmarks" target="_blank"&gt;Enhance your users' experience with bookmarks in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 02:45:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3425378#M44395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-12T02:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3426565#M44406</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Although it's a good idea it's not what we really want to do, as it would involve using bookmarks just to have 1 filter. What we want to achieve is to send a filter in embedding time, replacing the default one, without having to wait until the report is loaded. Is this possible somehow?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 14:25:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3426565#M44406</guid>
      <dc:creator>nazanael1</dc:creator>
      <dc:date>2023-09-12T14:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3427850#M44422</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/613896"&gt;@nazanael1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I check the document about embedded config and find it include filters option, I think you can use it to setting the filters:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/configure-report-settings#provide-configuration-information" target="_blank"&gt;Configure embedded Power BI report settings in a Power BI embedded analytics application | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-filters" target="_blank"&gt;Use filters when embedding a report in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;var basicFilter = {
  $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "Table",
    column: "Column"
  },
  operator: "In",
  values: [1, 2, 3, 4]
}

var config = {
  type: 'report',
  accessToken: 'access-token',
  embedUrl: 'https://app.powerbi.com/reportEmbed?reportId=report-id',
  filters: [basicFilter]
};

var reportContainer = $('#reportContainer')[0];
var report = powerbi.embed(reportContainer, config);&lt;/LI-CODE&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Xiaoxin Sheng&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 07:24:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3427850#M44422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-13T07:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3427950#M44423</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;That is what we want to do. The issue doing it this way is that it does not overwrite the default filter. In the image, the report after being embedded. In the original report, the Filter is set as "Light".&lt;/P&gt;&lt;P&gt;Doing what you explained, I changed to "Dark", but it is not being replaced, just adds it twice (Even having Require single selection).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original (Power BI Service)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-09-13 at 09.54.20.png" style="width: 236px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/967984iA36028697FEAEEEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-09-13 at 09.54.20.png" alt="Screenshot 2023-09-13 at 09.54.20.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Embedded: After adding "Dark" in the config&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-09-13 at 09.48.54.png" style="width: 285px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/967979i02D3C3FEC1106919/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-09-13 at 09.48.54.png" alt="Screenshot 2023-09-13 at 09.48.54.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We expected here to remove the Light and add the Dark filter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is why I wanted to use &lt;A href="https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/powerbi-client.models.reportonloadfilters" target="_blank"&gt;ReportOnLoadFilters&lt;/A&gt;, to be able to replace the previous one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to replace it using the config object?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 07:56:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3427950#M44423</guid>
      <dc:creator>nazanael1</dc:creator>
      <dc:date>2023-09-13T07:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI embedding - Set and replace filters at embed time (config object)</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3442530#M44620</link>
      <description>&lt;P&gt;no more ideas about how to achieve this?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 07:15:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-embedding-Set-and-replace-filters-at-embed-time-config/m-p/3442530#M44620</guid>
      <dc:creator>nazanael1</dc:creator>
      <dc:date>2023-09-22T07:15:49Z</dc:date>
    </item>
  </channel>
</rss>

