Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I am working on a demo project which uses the powerbi.js file to embed the report.
var reportConfig = { settings: { filterPaneEnabled: true } }; var report = powerbi.embed(reportElement, reportConfig);
I am trying to create a filter object and set it to the reportConfig's property so the report gets loaded along with the filter.
Below is the basic filter I am creating.
var basicFilterdemo = { $schema: "http://powerbi.com/product/schema#basic", target: { table: "Query1", column: "Email" }, operator: 'In', values: ['test@gmail.com'] };
Can some one help me get a way to configure the filter.
setting
var reportConfig = { settings: { filterPaneEnabled: true },
basicFilter:basicFilterdemo };
dint work and also how do I set the level(Report/Page) at which this filter would be set.
calling addFilter() inside report.on('loaded',function() works fine but the original report is first loaded and stays there for a couple of seconds and then the change occurs. So that isnt a viable option for me
Solved! Go to Solution.
You can create a filter and apply it to the filters properties of the embed configuration. Check Embed Configuration Details.
The problem now is, there's a bug that stops the filters properties from working, check validateReportLoad incorrectly returns schema errors for valid filters. The workaround is, as your mentioned, set the filter after loaded.
Regarding how to set the level(Report/Page), check Understanding the object hierarchy, Both Report and Page have the setfilters function.
No I wasnt able to reach at a viable solution at the time last tested.
As per their response,
"The problem now is, there's a bug that stops the filters properties from working, check validateReportLoad incorrectly returns schema errors for valid filters. The workaround is, as your mentioned, set the filter after loaded"
The bug could have been fixed.
But if you are implementing it correctly and yet not able to get the filter in place, then lets conclude the bug still exists.
You might want to try the workaround I tried mentioned in my query itself, although it wasnt a viable solution for me
You can create a filter and apply it to the filters properties of the embed configuration. Check Embed Configuration Details.
The problem now is, there's a bug that stops the filters properties from working, check validateReportLoad incorrectly returns schema errors for valid filters. The workaround is, as your mentioned, set the filter after loaded.
Regarding how to set the level(Report/Page), check Understanding the object hierarchy, Both Report and Page have the setfilters function.
So you mean the entire filter property isnt working for now when setting it up in the embed configuration.
And the way I have done with the function being called at the load event is the way we need to do, at least for now?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
2 | |
1 | |
1 |