Creating Dynamic Titles Using DAX
Dynamic titles change automatically based on user interactions (slicers, filters). They provide context about what data is currently being displayed.
Why Use Dynamic Titles?
• Tell users exactly what they're looking at • Reflect the current filter/slicer selections • Make reports more professional and user-friendly • Reduce confusion when multiple filters are applied
How Dynamic Titles Work
- Create a DAX measure that returns a text string
- Use the measure as the title of a visual
- The title updates automatically when filters/slicers change
Step-by-Step: Creating a Dynamic Title
Step 1: Create a DAX Measure
Sales Title =
"Total Sales for " & SELECTEDVALUE(Dates[Year], "All Years") &
" - " & SELECTEDVALUE(Products[Category], "All Categories")
Step 2: Apply to Visual Title
- Select a visual
- Go to Format → Title
- Click the fx button (conditional formatting icon)
- In the dialog, set Format style to Field value
- Select your DAX measure as the field
- Click OK
Result: The chart title dynamically shows: • "Total Sales for 2024 - Electronics" (when both slicers are set) • "Total Sales for All Years - Laptops" (when only category is set) • "Total Sales for 2024 - All Categories" (when only year is set)
Useful DAX Functions for Dynamic Titles
SELECTEDVALUE()
Returns the selected value if a single value is selected; otherwise returns a default.
SELECTEDVALUE(Column, "Default Text")
CONCATENATEX() for Multiple Selections
When multiple values are selected in a slicer:
Selected Regions =
"Regions: " & CONCATENATEX(VALUES(Region[Name]), Region[Name], ", ")
Result: "Regions: East, West, North"
IF with ISFILTERED()
Filter Status Title =
IF(
ISFILTERED(Products[Category]),
"Filtered by: " & SELECTEDVALUE(Products[Category]),
"All Categories"
)
Dynamic Title Examples
| Scenario | DAX Measure |
|---|---|
| Year selection | "Sales for " & SELECTEDVALUE(Dates[Year], "All Years") |
| Category + Year | SELECTEDVALUE(Products[Category], "All") & " Sales - " & SELECTEDVALUE(Dates[Year], "All Years") |
| Count display | "Showing " & FORMAT(COUNTROWS(Sales), "#,##0") & " transactions" |
| Date range | "From " & FORMAT(MIN(Dates[Date]), "MMM DD, YYYY") & " to " & FORMAT(MAX(Dates[Date]), "MMM DD, YYYY") |
Dynamic Subtitles
You can also create dynamic subtitles by adding a text card visual with a measure:
Report Subtitle =
"Data as of " & FORMAT(MAX(Sales[LastRefresh]), "MMM DD, YYYY hh:mm AM/PM")
Best Practices
• Always provide a default/fallback text for when no filter is selected • Keep dynamic titles concise — don't include too many filter values • Use FORMAT() for clean number/date display in titles • Test with various filter combinations to ensure titles make sense • Use consistent title formatting across all pages