Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
paul-maessen
Resolver I
Resolver I

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
dm-p
Super User
Super User

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!


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

 




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

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)




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors