Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi..
I need to programatically access the filters collection of filter panel of custom visual, at update method. If the whole filter collection is not accessible, it is enough having a boolean value true/false, to identify at-least a single filter is applied by the user, when current trigger of update method.
Can anyone advise how to access it or identify it programatically?
Thanks in advance..
Lasantha
Hi Lasantha,
To check if a filter is applied by the user in the update method of a custom visual, you can check the "jsonFilters" property of the "VisualUpdateOptions" object. This property contains an array of JSON filter objects, which represent the filters that have been applied by the user.
If the "jsonFilters" property is not empty, then at least one filter is applied. Otherwise, if it is empty, then no filters are applied. Here is an example of how you can check if a filter is applied by the user in the update method of a custom visual:
update(options: VisualUpdateOptions) {
// Check if at least one filter is applied
let isFilterApplied = options.jsonFilters.length > 0;
// Do something with the filter applied boolean value
}
You can also check the "jsonFilters" property to access the filter details like filter name, filter values, filter type, etc.
Hope this helps 🙂
Kind Regards,
Sahir
It's important to note that the filter collection returned by the enumerateObjectInstances method is an array of filter objects, that contains various properties such as the filter name, filter type, filter values and etc. You can use them in your update method code according to your requirements.
Hi Lasantha,
In Power BI, you can programmatically access the filters collection of the filter panel of a custom visual at the update method by using the "enumerateObjectInstances" method of the "VisualObjectInstanceEnumeration" object. This method allows you to retrieve an array of objects representing the filter objects in the filter panel, which can then be accessed and manipulated in your update method code.
To check if at least one filter is applied by the user, you can check the length of the array returned by the "enumerateObjectInstances" method. If the length is greater than 0, then at least one filter is applied. Otherwise, if the length is 0, then no filters are applied.
Here is an example of how you can programmatically access the filters collection of the filter panel in the update method of a custom visual:
update(options: VisualUpdateOptions) {
// Get the filter collection
let filterCollection = options.objectEnumeration;
// Check if at least one filter is applied
let isFilterApplied = filterCollection.length > 0;
// Do something with the filter collection or filter applied boolean value
}
Hope this helps 🙂
Kind Regards,
Sahir
Hi Sahir...
Thank you for responding...
I checked this way. But it has only below properties. Not available a property named "objectEnumeration".
I also have impemented "enumerateObjectInstances" method. There also it returns only the persistsProperies.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.