Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
cranial3
Frequent Visitor

jquery filter not working on Embedded report

 Hi

 

I have a Report embedded into an MVC Web app, the problem is that my filter does not work, i have tried various methods to no avail.

 

<script type="text/javascript">

window.onload = function () {
var Filter1 = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "vw_NGO_Registrations",
column: "NGOName"
},
Operator: "In",
values: ["BADISA"]
}
var config = {
type: 'report',
accessToken: "@(Model.Token)",
embedUrl: "@Model.PBIReport.embedUrl",
id: "@Model.PBIReport.id",
filters: [Filter1],
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
var reportContainer = document.getElementById('reportContainer');
var report = powerbi.embed(reportContainer, config);

});
});
};
</script>

I have also tried adding the following at the bottom of the script

 

report.on('loaded', event => {
report.getFilters()
.then(filters => {
filters.push(Filter1);
return report.setFilters(filters);

The report just keeps showing all the data, additionally, The filter pane does NOT show, i dont know if that has anything to do with it, even though i explicitly set filterPaneEnabled = true. Even when i remove the settings, it still wont show.

Even when i added the following, still no filter pane.

 

<div ID="reportContainer" style="width: 900px; height: 500px" powerbi-settings-nav-content-pane-enabled="true"   powerbi-settings-filter-pane-enabled="true"></div>

 

Thank you

 

2 REPLIES 2
Eric_Zhang
Microsoft Employee
Microsoft Employee


@cranial3 wrote:

 Hi

 

I have a Report embedded into an MVC Web app, the problem is that my filter does not work, i have tried various methods to no avail.

 

<script type="text/javascript">

window.onload = function () {
var Filter1 = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: "vw_NGO_Registrations",
column: "NGOName"
},
Operator: "In",
values: ["BADISA"]
}
var config = {
type: 'report',
accessToken: "@(Model.Token)",
embedUrl: "@Model.PBIReport.embedUrl",
id: "@Model.PBIReport.id",
filters: [Filter1],
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true
}
};
var reportContainer = document.getElementById('reportContainer');
var report = powerbi.embed(reportContainer, config);

});
});
};
</script>

I have also tried adding the following at the bottom of the script

 

report.on('loaded', event => {
report.getFilters()
.then(filters => {
filters.push(Filter1);
return report.setFilters(filters);

The report just keeps showing all the data, additionally, The filter pane does NOT show, i dont know if that has anything to do with it, even though i explicitly set filterPaneEnabled = true. Even when i remove the settings, it still wont show.

Even when i added the following, still no filter pane.

 

<div ID="reportContainer" style="width: 900px; height: 500px" powerbi-settings-nav-content-pane-enabled="true"   powerbi-settings-filter-pane-enabled="true"></div>

 

Thank you

 


@cranial3

How is it going on if you run the test embedding report demo? Does the filter pane show? By the way, what is the browser in your case, have you observed anything wrong in the tab of Console and Network of browser dev mode(F12).

Hi

 

No Filter Pane is shown when using the embedded report demo, it displayed the report exactly as in my browser.

I am using Chrome, i installed firefox, and viewing is the same in there too, no filter pane.

I checked the console, no errors except for "Slow network is detected".

 

Thanks

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.