Power BI: Dynamic Title based on Slicer selection

Monika Mishra
Microsoft Power BI
Published in
4 min readSep 3, 2022

--

Dynamic Chart Title (Image by Author)

Background

Many times the report consumers want the chart title to get updated with the slicer selection. In this blog post, I’ll show you how to set dynamic titles for visuals using DAX.

The Data

Here I have the column chart displaying Sales by Date. I have a ‘Country’ slicer as well. My intention here is to change the title of the chart to display the name of the country selected in the slicer. Right now, the title of the chart is static — ‘Sales by Date’.

*For simplicity’s sake, I am taking one slicer as an example.

The chart and the slicer (Image By author)

A. Steps to create a dynamic title (Single Selection)

Step A.1 : Create a new calculated measure with the below DAX:

Title Single Select = “Sales for country -” & SELECTEDVALUE(financials[Country],”All Countries”)

This is a simple expression that will return the name of the country if only one country exists in the filter context, if not, it will return the text “All Countries”.

--

--

Monika Mishra
Microsoft Power BI

I am an avid lover of technology, always trying to expand my technological horizon. I am here to share my knowledge and honing my skills in the process.