cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Custom Visual: Is it possible to see when the visual is in Drill Mode?

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)

Screenshot 2020-09-21 at 11.59.27.png

When clicking on this icon you can turn Drill Mode on....

Screenshot 2020-09-21 at 11.59.42.png

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

 

 

 

 

 

 

 

 

 

3 REPLIES 3
Highlighted
Super User II
Super User II

Hi @paul-maessen

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

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted

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

 

 

Highlighted

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

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.