Forum Discussion
Support other visuals' selection in custom slicer
- 7 years ago
Hi,
To merge filtration, you should use applyJsonFilter with "merge" option.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]
Yes, I use ISelectionManager to filter data from custom matrix visual.
Unfortunately, true in select doesn't change the behavior. My custom visuals (matrix and slicer) go to infinite selection loop. Standard line chart shows data selected by matrix for a second. Then it shows data selected by slicer for another second. After that it shows data selected by matrix again. And this process continues until I close Power BI.
With standard matrix visual all the elements work fine.
Probably standard matrix uses filters too.
I am not sure that it is possible to merge filters and selections, you should use one of these approaches if you want to combine selection or filtration.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]
- v-evelk7 years agoMicrosoft Employee
"I see IFilterKeyHierarchyTarget but how to fill it and how to set conditions for all levels of hierarchy? This topic tells that only one filter can be applied."
Regarding this question, I don't have any examples of using this filter, but I can say that you can pass an array of filters into applyJsonFilter function that will be mean logical AND.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]- Anonymous7 years agoNot applicable
I replace selection in custom matrix visual with filtering through applyJsonFilter. Now Power BI does not hang and I can cancel filtering by another click. But all the visuals keep refreshing repeatedly.
I can guess the following. One custom visual applies filter. So all other visuals should be refreshed. When refreshing another custom visual applies its filter. All other visuals (including first one) should be refreshed again. First custom visual applies its filter again. And this process continues.
Am I right that there is no control on filters duplication?
If my giess is correct can custom visual recognize that its filter is applied now?
If I'm wrong what is the problem?- v-evelk7 years agoMicrosoft Employee
I can say that it depends on a visual and how it is implemented. Since you use filtration, your update options must contain something like options.jsonFilters so, you can detect whether there are any already applied filters or not.
Also, since you switched Selection model to Filtration model I can recommend you to remove visuals from your report and add them again because there is a chance that some old filtration or selection was saved and now it breaks filtration.
Kind Regards,
Evgenii Elkin,
Software Engineer
Microsoft Power BI Custom Visuals
[email protected]