Skip to content
Home » Power BI Exercise » Power BI Exercise – Dynamic Title – Multiple selections for Visual in Power BI

Power BI Exercise – Dynamic Title – Multiple selections for Visual in Power BI

5/5 - (4 votes)

Learn how to create a Dynamic title for visuals or handle Multiple selections dynamically in Power BI. This exercise includes adding a slicer for Region and configuring a chart title to dynamically display the selected region, enhancing the report’s interactivity.

Tasks:

  1. Load the dataset into Power BI.
  2. Create a slicer for Region.
  3. Add a dynamic title to the chart that reflects the selected region.

Solution:

Download Dataset: Sales Dataset

Load the dataset into Power BI-

Step-1: Load the dataset into Power BI.

Go to the Home tab > Click on Get Data > and select Text/CSV.

Get Data from txt
Get Data from txt

Step-2: After selecting the file, you can see the data preview. Click on Load.

Load data into Power BI
Load data into Power BI



Create a slicer for Region-

Add a slicer to the Power BI report page.

Add slicer in the report page
Add slicer in the report page

Add a dynamic title to the chart that reflects the selected region-

Step-1: Create a measure for a dynamic title.

Right-click on the dataset and select “New Measure.”

Create a new measure
Create a new measure

Step-2: Now, write the measure code below.

DynamicTitle =
VAR SelectedValues = 
CONCATENATEX(VALUES(Sales[Region]), Sales[Region], ", ")
RETURN
IF(
ISFILTERED(Sales[Region]),
"Sales for the Regions: " & SelectedValues,
"Sales for All Regions"
)



Step-3: Add a clustered column chart to the report page. Add the Region column to the X-axis and the Sales column to the Y-axis.

Step-4: Now select the clustered column chart, and go to the format tab of the visual and open the tile, and click on fx icon.

Dynamic Title Power BI
Dynamic Title Power BI

Step-5: A pop-up window appears for the Title text. Select the options below.

Format style: Field value

What field should we base this on?: Select DynamicTitle measure

and click on OK button.

Select Title Text
Select Title Text

Step-6: Now, select values from the Region slicer and see the result in the chart title.

Result of Dynamic Title
Result of Dynamic Title

I hope you enjoyed this Power BI exercise.

Loading

Leave a Reply

Discover more from Learn BI

Subscribe now to keep reading and get access to the full archive.

Continue reading