<?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: Embed Report Filter not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1191741#M24447</link>
    <description>&lt;P&gt;In your code sample, the table/column values are set to 'SampleParameter' + 'AgentID'&lt;/P&gt;&lt;P&gt;Your data model shows that field belonging to a table called 'ADW Agent DimCom....'&lt;BR /&gt;&lt;BR /&gt;You will need to make sure that the table/column names are correct before anything else.&lt;BR /&gt;If this isn't the issue... then I will try and spend a few minutes later on today - and try and replicate what you are seeing.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jun 2020 09:34:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-06-30T09:34:29Z</dc:date>
    <item>
      <title>Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189355#M24425</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read several posts and tried many examples and none of them are filtering my report. Below are a couple examples. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var accessToken = "@Model.EmbedToken.Token";

    // Read embed URL from Model
    var embedUrl = "@Html.Raw(Model.EmbedUrl)";

    // Read report Id from Model
    var embedReportId = "@Model.Id";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;

    // Get a reference to the embedded report HTML element
    var reportContainer = $('#embedContainer')[0];

    if ("@Model.Username" != "") {
        $("#RLS").prop('checked', true);
        $("#RLSdiv").show();
    }
    else
    {
        $("#RLS").prop('checked', false);
        $("#RLSdiv").hide();
    }

    if ("@Model.IsEffectiveIdentityRequired.GetValueOrDefault()" == "True") {
        $("#noRLSdiv").hide();
        $("#RLS").removeAttr("disabled");
        $("#RLS").change(function () {
            if ($(this).is(":checked")) {
                $("#RLSdiv").show(300);
            } else {
                $("#RLSdiv").hide(200);
            }
        });
    }
    else
    {
        $("#noRLSdiv").show();
    }

    const testFilter = {
        $schema: "http://powerbi.com/product/schema#basic",
        target: {
            table: "SampleParameter",
            column: "AgentID"
        },
        operator: "In",
        values: ["H1627"]
    };

    // 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.
    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.All,//models.Permissions.Read
        //can add filters here
        filters: [testFilter], //filter array here
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: true //the nav at bottom of report
        },
        //filterType: models.FilterType.BasicFilter
    };

    // Embed the report and display it within the div container.
    var report = powerbi.embed(reportContainer, config);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Build the filter you want to use. For more information, See Constructing
// Filters in https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters.
const filter = {
    $schema: "http://powerbi.com/product/schema#basic",
        target: {
            table: "SampleParameter",
            column: "AgentID"
        },
        operator: "In",
        values: ["H1627"]
};
 
// Get a reference to the embedded report HTML element
var embedContainer = $('#embedContainer')[0];
 
// Get a reference to the embedded report.
report = powerbi.get(embedContainer);
 
// Set the filter for the report.
// Pay attention that setFilters receives an array.
report.setFilters([filter])
    .then(function () {
        Log.logText("Report filter was set.");
    })
    .catch(function (errors) {
        Log.log(errors);
    });&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jun 2020 14:09:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189355#M24425</guid>
      <dc:creator>jrichardsherita</dc:creator>
      <dc:date>2020-06-29T14:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189742#M24429</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/242222"&gt;@jrichardsherita&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can see one potential issue...&lt;BR /&gt;The filter object doesn't contain a 'filterType' property.&lt;A title="Power BI Javascript Wiki" href="https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters" target="_blank" rel="noopener"&gt; https://github.com/Microsoft/PowerBI-JavaScript/wiki/Filters&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a working example that effectively matches what you have... with that one exception.&lt;BR /&gt;Filter types are as follows:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;export enum FilterType {
  Advanced = 0,
  Basic = 1,
  Unknown = 2,
  IncludeExclude = 3, // currently not supported
  RelativeDate = 4,
  TopN = 5,
  Tuple = 6,
  RelativeTime = 7
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;So your full example should be:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const testFilter = {
    $schema: "http://powerbi.com/product/schema#basic",
    target: {
        table: "SampleParameter",
        column: "AgentID"
    },
    operator: "In",
    values: ["H1627"],
    filterType: 1
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;If you are using TypeScript - you can also reference the pbi.models enum values for these&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;filterType: pbi.models.FilterType.Basic&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Hopefully this fixes it.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 16:14:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189742#M24429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-29T16:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189788#M24431</link>
      <description>&lt;P&gt;Thank you very much for the reply. Unfortuneately, that does not fix the issue. What happens is this filter puts 'AgentID' in the 'Filters on all pages' pane with a warning icon and obviously the report is not filtered. Using developer tools, that icon has a symbolid="fieldListError" and href="#fieldListError". I do not know what that means. I can change the filter to another column on the report and I will get the same issue. The code is in javascript. Is more content needed? Any other suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 16:51:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1189788#M24431</guid>
      <dc:creator>jrichardsherita</dc:creator>
      <dc:date>2020-06-29T16:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1190179#M24439</link>
      <description>&lt;P&gt;It's a bit tricky to diagnose without seeing the data model and relationships etc...&lt;BR /&gt;&lt;BR /&gt;A couple of questions though...&lt;BR /&gt;Does that filter (AgentID) already exist as an available filter in the filter panel? (e.g. is it there at design time in Power BI Desktop)&lt;BR /&gt;&lt;BR /&gt;And does the value that you are supplying exist within the available options -&amp;gt; Is it listed if you add the field as a filter in Power BI Desktop. + Does the filter work as expected (outside of the embedded environment)?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 20:14:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1190179#M24439</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-29T20:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1190217#M24440</link>
      <description>&lt;P&gt;Data Model:&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="PowerBIDMR.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/302088i28F8AC63EA3BE8D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="PowerBIDMR.png" alt="PowerBIDMR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Filter from design time in Power BI Desktop (but I can remove this and remember I mentioned that other columns not already added do not work):&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="jrichardsherita_0-1593462936512.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/302089i448A75236B8A1EC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jrichardsherita_0-1593462936512.png" alt="jrichardsherita_0-1593462936512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Yes the value exists and yes the filter works as expected. Is anything else required?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jun 2020 20:38:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1190217#M24440</guid>
      <dc:creator>jrichardsherita</dc:creator>
      <dc:date>2020-06-29T20:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Embed Report Filter not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1191741#M24447</link>
      <description>&lt;P&gt;In your code sample, the table/column values are set to 'SampleParameter' + 'AgentID'&lt;/P&gt;&lt;P&gt;Your data model shows that field belonging to a table called 'ADW Agent DimCom....'&lt;BR /&gt;&lt;BR /&gt;You will need to make sure that the table/column names are correct before anything else.&lt;BR /&gt;If this isn't the issue... then I will try and spend a few minutes later on today - and try and replicate what you are seeing.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jun 2020 09:34:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Embed-Report-Filter-not-working/m-p/1191741#M24447</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-30T09:34:29Z</dc:date>
    </item>
  </channel>
</rss>

