![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-58.png?resize=1038%2C576&ssl=1)
Dynamic Title for Multiple Selected values using DAX
Today’s post is about creating a dynamic title for multiple slicer selection for Power BI report. Dynamic title means your title and visual changes based on the filter context.
I was working on a project last week and needed to create a dynamic title for a report based on multiple slicer selection. I did some research and came across a good video from Guy in the cube that helps me in achieving my goal.
- Let’s start by creating a simple report.
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-51.png?resize=640%2C417&ssl=1)
- To display a dynamic title based on multiple Category selection, we create a DAX measure using CONCATENATE and CONCATENATEX functions
Category = “Total Sales for: ” &
IF(
DISTINCTCOUNT(‘DimProduct'[Color]) > 4,
CONCATENATE(
CONCATENATEX(
TOPN(
4,
VALUES(‘DimProduct'[Color]),’DimProduct'[Color],
ASC
),
‘DimProduct'[Color],
“, “,
‘DimProduct'[Color],
ASC
),
” …”
),
CONCATENATEX(
VALUES(‘DimProduct'[Color]),
‘DimProduct'[Color],
“, “,
‘DimProduct'[Color],
ASC
)
)
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-56.png?resize=640%2C419&ssl=1)
- Select the visual you want the dynamic title to display on
- Under Visualization, turn on the Title
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-52.png?resize=640%2C323&ssl=1)
- For Title text, select the ellipsis – > Conditional formatting
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-53.png?resize=361%2C591&ssl=1)
- Select the DAX Measure you created from the drop down -> Click OK
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-54.png?resize=640%2C454&ssl=1)
- Select categories on the slicer and the title will display based on the selection
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-58.png?resize=640%2C418&ssl=1)
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-59.png?resize=640%2C416&ssl=1)
![](https://i0.wp.com/rukiatu.com/wp-content/uploads/image-60.png?resize=640%2C418&ssl=1)
Happy reporting 🙂
3 thoughts on “Dynamic Title for Multiple Selected values using DAX”
Great job, very helpful
Great Post, thank you! Will try this
Awesome
Comments are closed.