Forum Discussion
Dynamic title name doesn't change
Hi Christianvs ,
To add a dynamic title to a chart in Power BI, you need to create a measure that generates the desired text dynamically based on user interaction, and then use that measure to conditionally format the chart title. You mentioned that the dynamic text works on a Card visual but doesn't update when used as a chart title. This typically happens because the chart title needs to be explicitly linked to a field value for the dynamic text to work.
First, ensure you have a DAX measure that constructs the title based on the selected user. Here's an example of a measure that achieves this:
Dynamic Title = "Antal sager løst af " & SELECTEDVALUE('Users'[UserName]) & " fordelt på"
In this measure, SELECTEDVALUE is used to dynamically retrieve the name of the user selected from a slicer or table. The text string "Antal sager løst af " will change depending on the user's selection.
Once your measure is created, you need to apply it to the chart's title. To do this, select the chart in your report, go to the Visualizations pane, and under the Format Your Visual section, find the Title option. Next to the Title Text field, click the small fx button to open the conditional formatting window. In the conditional formatting settings, choose Field value as the formatting option and select your Dynamic Title measure from the dropdown. Click OK to apply the dynamic title.
This approach should resolve the issue where the title works in a Card visual but doesn't update dynamically in the chart title. The key step is setting the title text to be conditionally formatted by a measure, as Power BI does not automatically apply dynamic titles to charts without this configuration.
Best regards,
Hi DataNinja777
I posted my issue a bit too fast and forgot to add that the measure I use is as you write it:
And I already added it as a conditional formatted text:
It is in danish in my screendumps, but it should be possible to decipher whether I've done it correctly
- danextian1 year agoSuper User
Are you using the same column from the image below in your measure?
If you're using the same column, this should return a single value when one is selected otherwise it will be "alle burgere" as in your measure. If you're not using the same column, there could be more than one value of navnpabruger for each x1 value and if there are more than one values, SELECTEDVALUE will return the alternate result.
- Christianvs1 year agoHelper II
Hi danextian
Just to clerify, the columns in the image are anonymized. I added a white box with X1, X2 and so forth.
The actual table/column only returns one value as far as I am aware. And it works if I use the measure in a text box or a card, then the text displays the name of the selected user correctly. But if I select multiple values it returns "alle brugere".So it seems that the measure that created the dynamic text works perfectly fine when I use it in a text box or a card, but not when I use it as a conditionally formatted title.
Did that answer your question?