Forum Discussion
Custom visual Filter Api - cross filtering
Hello All,
I am creating a custom visual where I need to know on which field I am getting filtered data.
for eg: let say I have my visual containing 3 fields now there is another slicer (powerbi slicer) visual which contain one of the three fields. Now if the filter has been applied from powerbi-slicer, how can I identify on which field filter has been applied?
Currently What I am doing is saving initial load whole data and on each rendering I am checking if there is filter happening or not (by dataViews metadata properties "isDataFilterApplied") if there is filteration then I am comparing for any differences but this is also not working in some cases.
Please Help, Thanks
1 Reply
- AnonymousNot applicable
Hi Anujshaan ,
You might consider using the SelectionManager to keep track of which data points are selected.
https://learn.microsoft.com/en-us/power-bi/developer/visuals/selection-api
This is the related document, you can view this content:
Personalize visuals in a report - Power BI | Microsoft Learn
Main sources for acquiring Power BI custom visuals - Power BI | Microsoft LearnPower KPI Matrix (microsoft.com)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.