Dynamic Title

This article provides the steps for creating a dynamic title in Power BI reports.

Detailed Instructions

  1. Example: You want to show the term description on the title based on the selection on the slicer. Before using a dynamic title, the static title on the table shows "Enrollment" only.  Below is the screenshot of the table with the static title.
    Showing a table in Power BI using a static title rather than a dynamic table.
  2. Click the ellipsis next to the name of the table (query) and click "new measure".
    showing the location of the New Measure button in the table dropdown menu.
  3. On the formula bar, write Table title = "Enrollment for " & SELECTEDVALUE( 
    When you start writing the DAX, the pop-up window will automatically show up and let you choose the field.showing an example of the Table title box that appears when entering DAX in Power BI.
  4. In this case, a term description from the term table was chosen. After you pick the field, enter the close parenthesis at the end and then hit "enter".  Make sure the field type is text.
    showing an example of the completed box for DAX which will create a dynamic heading.
  5. Click the table (visual) and expand the "Title" on the Visualizations pane. Click the "fx" button.
    showing the location of fx icon for the title heading in edit visuals.
  6. Pick the field name you just created on step 3 under the "Based on field" dropdown and click "OK"
    showing the title text window which is where you would complete step 6.
  7. Now you will see the dynamic title. When you pick a different term, the title will change.
    Showing an example of a table in a Power BI report using a dynamic title.
  8. You can elaborate more on the dynamic title. Here are some examples:
  • The DAX set in the previous steps only works when only one value is selected. When multiple values are selected, the dynamic title will NOT show any term descriptions. You can set the alternative value as follows:
Table title = "Enrollment for " & SELECTEDVALUE(Term[TERM_DESCRIPTION],"Multiple Terms")

You will see "Multiple Terms" on the tile when you select multiple terms now. 
showing an example of a table in a Power BI report using the dynamic title with multiple terms.

  • If you want to list all of the selected terms, you can set it up like this:
Table title = 
"Enrollment for "
    & IF (
        ISFILTERED ( Term[TERM_DESCRIPTION] ),
        CONCATENATEX (
            FILTERS ( Term[TERM_DESCRIPTION] ),
            Term[TERM_DESCRIPTION],
            " & "
        ),
        "all terms"
    )

You will see this:
showing an example of a table in a Power BI report using a dynamic title with all terms listed.

  • You can show "all terms,"  "multiple terms," or a single term, depending on your selection.
  • Table title =
    "Enrollment for "
        & IF (
            NOT ISFILTERED ( Term[TERM_DESCRIPTION] ),
            "all terms",
            SELECTEDVALUE ( Term[TERM_DESCRIPTION], "multiple terms" )
        )
    

External Resource

Environment

  • Power BI