Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
When you enable drill down for your custom visual by adding this option to your capabilities.json-file some additional icons are added to the header of the visuals.
On the right side of the header an additinal icon is added (see the icon with the arrow in the image below)
When clicking on this icon you can turn Drill Mode on....
When this Drill Mode is on you can click on a data point to drill down on this data point.
However....
If I am not able to detect that this Drill Mode is on, clicking on this data point will also select the data point. Further is the display name in the tooltip different when this Drill Mode is on.
My question is now if it is possible to detect this mode using the PowerBi Visuals API?
Paul
There's no properties on the visual host or visual update options that expose this info. I've just reviewed the Selection Manager API as well just in case, and we only have methods we can invoke based on selectionId(s); it appears that the visual host delegates the select action on our behalf based on the drill preference from the visual header and updates the dataView accordingly. I wired this up in a visual I'm currently working on and seems to confirm my initial thoughts.
I'd suggest creating an enhancement request for it and see if the team might be able to expose this in an update or provide more targeted guidance on your particular use case.
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 Daniel @dm-p
I will add an enhancement request to expose this setting to the API.
When I was looking into the issue further I noticed that drilling down by clicking on a data-point adds a filter to the visual.
Do you know if there is a way to see what filters are applied to a visual using the powerbi-visuals-api?
Regards
Paul
Hey @paul-maessen,
Unfortunately not, no. The dataView just contains results of the query, so the filter details are not known.
You only get to see filters applied if it's your visual doing the filtering, i.e. it's working as a slicer. In these cases, you'll get the details in the jsonFilters property in the visual update's options object. This will only be the filters your visual has applied, so again, no external criteria.
The only time a regular visual gets hints of what's being filtered is if it's enabled for highlight. In these cases, you still need to compare values array vs highlights array.
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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |