BUSINESS INSIGHTS

Feb 20, 2018

Create a Dynamic Title in Power BI

Lindsay Pinchot Posted by Lindsay Pinchot

As features like Drillthrough open the door for Power BI reports to become more interactive – and by extension, potentially more complex – it is important that they remain intuitive to use. For example, I have been in several meetings where a Power BI report with drillthrough capabilities is used to drive conversation. As the presenter drills through the report, she is often asked to go back to the original page to double check her selection. This happens for various reasons, whether it’s because the data doesn’t match what people were expecting (eek!), or because the meeting veered off topic a little and now no one can remember with certainty what was selected. All this clicking back and forth eats up valuable time and reduces productivity. The worst part? It’s easily avoidable – simply add a dynamic title to your drillthrough page.

Dynamic Titles in Power BI.png

The suggestion of a dynamic title in Power BI was first introduced to me by a few of my colleagues at BlueGranite, and I was immediately struck not only by its usefulness, but by how easy it is to implement. It’s simple, powerful, and immensely valuable from a user-experience stand point. It’s something every report developer should be able to do, and I’ll show you how in this post.

Below is a simple report that has both drillthrough and a dynamic title.

As the user right-clicks a breed from the table to drill through and find out more about it, the “Breed Info” page dynamically displays the selected breed as a title.

breed1.png

breed2.png

Creating a dynamic title can be done in two relatively simple steps:

First, create a measure that uses the field supplied in the drillthrough filter and the following DAX formula:

<Measure Name> = IF(HASONEVALUE('<dataset name>' [<field name>]), VALUES('<dataset name>' [<field name>]), "<default value>")

The first part of this formula checks to see if one value is selected within the specified field. If there is only one value, then it displays that value, otherwise it displays a default value.

For the report embedded in this post, mine looks like this:

embed.png

Tip: If you want a page in a report to only be accessible via drillthrough or by clicking a bookmark, right click its tab and set it to hide. By doing this, users can only access it in a way you set up – they can no longer click to it from its tab. This ensures that when accessed via drillthrough, only one value will ever be selected in the drillthrough filter, so the page’s visualizations and title can be set up accordingly, and the user will never see the default title value.

drillthrough.png

Next, use the card visualization to display the measure. To make it look like a title, set the category label to off, and make the data label font size bigger.

visualizations1.png visualizations2.png

A dynamic title takes only a few minutes to implement and provides significant value to users. This method can be adapted for use in reports that have bookmarks, or to display slicer selections, too. It can take a Power BI report to that next level of greatness by making user experience a top priority. Even little details like this can go a long way when you’re trying to stay on track in a meeting, right?

For more help with DAX, or report design in general, please reach out to us here at BlueGranite!

7 Steps to Better Power BI Visuals
Lindsay Pinchot

About The Author

Lindsay Pinchot

Lindsay is a Solution Consultant with BlueGranite. She has experience in data analytics and report development, ETL development and design, and specializes in the Azure Data Platform. Lindsay obtained her Bachelor of Arts from John Carroll University with a focus in English and Computer Science. She is a Microsoft Certified Solutions Associate who enjoys working with data in several industries, including healthcare, finance, manufacturing, and retail.

Latest Posts

7 Steps to Better Power BI Visuals