Dynamic Title for Multiple Selected values using DAX

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.
  • 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
)
)

  • Select the visual you want the dynamic title to display on
  • Under Visualization, turn on the Title
  • For Title text, select the ellipsis – > Conditional formatting
  • Select the DAX Measure you created from the drop down -> Click OK
  • Select categories on the slicer and the title will display based on the selection



Happy reporting 🙂

3 thoughts on “Dynamic Title for Multiple Selected values using DAX

Comments are closed.

Comments are closed.