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]
I am not sure about matrix. If it uses selectionManger, you can try to use selectionManager with the second parameter as 'true' to enable multi-selection.
this.selectionManager.select(selector, true).then((ids: ISelectionId[]) => {
//called when setting the selection has been completed successfully
});
Regarding IFilterKeyHierarchyTarget I will ask our engineers and provide info here later.
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.
- v-evelk7 years agoMicrosoft Employee
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?