Forum Discussion
JS API: Apply multiple slicers on a report with one button
Hello!
- I am currently trying to only apply multiple different filters or slicers on a report after a button is clicked (for context, this is to minimize queries to a database when the data is large and while using DirectQuery).
- I know there are capabilities to have each individual filter/slicer have its own "apply" button, but was wondering if this was possible if I wanted to wait to submit all of them at once in the same query.
- If there is no out of the box solution, I was hoping to use the "buttonClicked" event in the JS API https://github.com/Microsoft/PowerBI-JavaScript/wiki/Handling-Events but have had issues actually capturing the button click (it didn't appear to be propagating as expected), along with getFilters, or setFilters https://github.com/microsoft/PowerBI-JavaScript/wiki/Filters to accomplish this.
Does anyone know of any solutions, or have any helpful tips?