our userss have complained that having to teach people how to right click and find the drill feature, they'd instead like a button at the top of the visual where they can click and it applies the dri...
Based on the screenshot provided, it appears that the goal is to identify the widgets that have the drill hierarchies feature, allowing end users to utilize this functionality. Having an Indication of Drill can be set up Using the Script Below.
Generally, the Drill Hierarchy feature offers two options:
Automatically including the hierarchy when adding dimensions.
Selecting the hierarchy at the time of adding dimensions.
See Related Screenshot
Script Overview
Check all the Panels for Each widget for Hierarchies/activeHierarchies element. For Automatically including the hierarchy - the element exist only after selecting a hierarchy, otherwise the script will not indicate that the widget can be drilled. Steps to Follow: - Add the dimension column - save the widget - right click on hierarchy and click on drill - Hierarchies/activeHierarchies element will be available and the Icon will appear.
For Selected Hierarchies - Add the Dimension Column - Select the Hierarchy - Hierarchy element will be available
Include an icon indicating drill functionality in the widget title:
The icon is placed before the widget title without overwriting it.
The icon can be replaced in the drill_icon variable
The icon position can be adjusted.
Add a guide for the end user to the widget description:
The description is initially predefined but can be customized in the additional_text variable
Append the information to the existing widget description.
Implementation
Open the Dashboard Options.
Navigate to Edit Script.
Paste the script provided below.
Refresh the dashboard to apply the changes.
Dashboard Script
/* update the following variable */
var drill_icon = '🔽 '; /* replace with the icon */
var additional_text = ' Right Click to Drill Hierarchies'; /* replace with the widget description */
dashboard.on("refreshend", function(se, ev) {
// Get all widgets from the dashboard
var widgets = se.widgets.$$widgets;
// Iterate through each widget
widgets.forEach(function(widget) {
// Get the widget's metadata panels and other necessary properties
var widgets_metadata = widget.metadata.panels;
var widget_oid = widget.oid;
// Iterate through each panel in the widget's metadata
widgets_metadata.forEach(function(panel) {
// Iterate through each item in the panel
panel.items.forEach(function(item) {
// Check if the item has hierarchies
if (item.hierarchies || item.activeHierarchy) {
$(`widget[widgetid="${widget_oid}"] widget-header .app-icon--general-info-circle`).css('color', 'red');
$(`widget[widgetid="${widget_oid}"] widget-header .app-icon--general-info-circle`).closest('.widget-toolbar-btn').css('opacity', '1');
// Adding widget description and Icon to the title
if (!widget.title.includes(drill_icon)) {
widget.title = drill_icon + widget.title;
}
if (!widget.desc.includes(additional_text)) {
widget.desc += additional_text;
}
}
});
});
});
});
Is it possible for this to be automatic? Meaning, If I click on a bar in a chart to create the filter, can it also automatically drill into the next level in the hierarchy without me having to right click into the drill down?
The Script Doesn't support it and Natively it's not supported. it might be possible using Script but required additional development and Checks. Additionally, not sure if that's the best user experience to Filter and Drill at the Same time as it's missing the Primary Category.
Alternatively, Consider having Blox Action to Add Secondary Dimension which can behave as Drill and can provide more User Experience. Please find a community example for Pivot table.