Forum Discussion
alexpokerface
1 month agoFrequent Visitor
How to detect drill mode
Hi, a quick question: In the Power BI custom visuals API, is there any way to detect whether the visual is currently in drill mode (as opposed to normal selection mode)? Thanks and kind regards, ...
dm-p
1 month agoSuper User
Hi alexpokerface,
Unfortunately there's no simple method to check this. I think the only way to detect this would be to check the dataView.metadata for the presence of drillableRoles, and perhaps, based on your knowledge of your setup, whether the resulting state means you're somewhere in the hierarchy (e.g, if there's no DrillType.Up available on a role, then you are at the top of your hierarchy, and therefore you aren't in a drill state.
The pattern for interrogation of drill state here in the docs may provide a starting point for you.
Good luck,
Daniel