Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I am using the Javascript API to embed a powerbi report however the filter is not affecting the result. The code is as follows:
function getFilters () {
const filter1 = {$schema: "http://powerbi.com/product/schema#basic",target: {table: "Users",column: "ID"},operator: "In",values: ["470"]};
var allFilters = [filter1];
return allFilters;
}
The above function is called from an updateEmbededDashboard function that contains
report.getFilters()
.then(function(filters) {
var allFilters = getFilters();
filters.push(allFilters);
if (allFilters != null) return report.setFilters(allFilters);
}).catch (function (error) {
console.log(error.message);
});
Solved! Go to Solution.
In case anyone else comes accross this:
The issue was having the numeric value in double quotes. Instead of
operator: "In",values: ["470"]};
It should be
operator: "In",values: [470]};
In case anyone else comes accross this:
The issue was having the numeric value in double quotes. Instead of
operator: "In",values: ["470"]};
It should be
operator: "In",values: [470]};
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |