The Power BI May 2020 release enhanced the existing drill through options. Previous functionality would provide the drill-through option to different pages unconditionally, so a user needed to be aware of the content for each page to drill to that page.
Now we can drill-through conditionally with the help of a button. Let’s see different scenarios where a user can drill-through conditionally.
Scenario 1
We are doing profitability analysis in a Waterfall chart showing Product revenue, Variable Cost, Fixed Cost and Totals Revenue KPI’s will be different from Fixed Costs/Variable Costs.
In this case, we want to drill to different individual pages based on the selection made from the Waterfall chart bars. This is possible using a ‘conditionally drill-through’ action.
Below features can be conditionally set in button for drill through.
- Button text
- Button Fill, Outline
- Button Actions
- Destination
- Enabled tooltip
- Disabled tooltip
When clicking on the “Product Revenue” the Drill button will target the “Products” page and clicking the “Variable Costs” or “Fixed Costs” will target the “Actual Cost” page with help of DAX. The button will display “Drill” when disabled and dynamic text when enabled based on bar chart selection.
Pre-requisite: Need a valid drill-through page within the report.
Step 1: Create the DAX formula for the Button text and Destination as below.
Step 2: Map the created DAX in the button text and button action -> Destination
Step 3: Format the button to show the difference between disabled and enabled state.
Step 4: Give a meaningful tooltip for the disabled and enabled state. (If left blank, Power BI automatically generates tooltips)
Scenario 2
In many cases, a user may want to drill-through after selecting several scenarios or pre-requisites for a drill. Conditional drill-through will be used to achieve this.
A user needs to select a category and a region bar before drilling to different pages. The Drill button will be enabled only after selecting a category and region from both the charts.
For increase the interactivity, drill text will change dynamically based on the selection of the bar.
Pre-requisite: Need a valid drill-through page within the report.
Step 1: Create DAX for the Button text and Destination as below.
Step 2: Map the created DAX in the button text and button action -> Destination.
Step 3: Format the icon default and disabled state, otherwise we may not see the difference between the disabled and active state of a button.
Step 4: Give a meaningful tooltip for the disabled and enabled state. (If left blank, Power BI automatically generates tooltips)
Create separate DAX for enabled and disabled tooltips as below.
When user didn’t make any selections, the drill button tooltip will display “Select a Region and Category to enable Drill”, when a user selects the category and didn’t make any choice on region tooltip will show “Ctrl + Select a single region too” and vice versa. Your displayed tooltip text is conditionally based on the user selections.
The use of conditional drill-through can be expanded for many other use cases. Learn more about Microsoft Power BI services offerings from Visual BI solutions here.
Subscribe to our Newsletter
The post Conditionally Drill-through action in Power BI appeared first on Visual BI Solutions.