The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
is there a way to get information about the selection that gets created when including/excluding a datapoint using a context menu?
We have a custom visual and need to know, if the user included/excluded a datapoint using the context menu so we can show a button to reset this selection.
Using the selectionManager.clear() method isn't working.
Best regards
Hi @lucmax,
The context menu is governed by the main window and the visual only has the option to display it (with the option of passing a selection ID in order to trigger enable data point functionality for end users). There is currently no support for obtaining information or events (e.g. through callbacks) from this menu.
As you've probably observed, including/excluding data points will cause Power BI to employ a visual-level filter for those conditions. As this shown in the filter pane and is external to the visual's dataset there is no current way of telling that these filters are in-place from within a visual; an exception being if your visual is designed to work as a slicer (but then only knows about the filters it has explicitly set rather than those imposed by the main window or other slicers).
If you want to be able to determine this, then it would need to be a feature request. It could be worth framing this is to obtain details of any visual level filters that are applied to the visual as this might cover additional cases other than the context menu events. This might be seen as giving the visual more data than it should technically know about, but that's a call for MS. I would personally love to see some kind of feature parity with Power BI Embedded here, as it can create all kinds of potentially useful additions for visuals.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @lucmax,
Did this link help with your scenario? if that is the case, you can consider Kudo or accept this to help others who faced similar requirements.
If these also don't help, please share more detailed information for your requirements to help us clarify your scenario and test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @v-shex-msft,
unfoutunatly it did not help. What we actually need to is either get the selected item when clicking on the filter buttons within the context menu, or to disable/hide the buttons when creating it. Maybe there is a way to disable/hide the buttons within the context menu?
Regards,
lucmax
Hi @lucmax,
I think you can check the following link about the data point selections on custom visual if it meets to your requirement:
Power BI visual data point selections - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
2 | |
1 | |
1 | |
1 |