Dynamic title/label names (need help)

I’m trying to have my chart title be dynamic based on what filter(s) the user selects. For example, if the user selects the year 2017 and the state of California - I’d like my chart title to be something like:

“[2017] Revenue in [California] by month”

Ideally, it would be a combination of static test and references to the filter(s) selected, as shown in the example. I’ve so far tried using a Data Label with the same Dimension used by my chart and then connecting it to the same filter, but no text is displayed. Anyone know how I can best accomplish this? Thank you!

You are on the right track - data label is indeed the way to go. There are 2 key points here:

  • The static text within the data label should be added under “Label Text” property

  • Both dimensions (in your example year and city) should be added to the data label rows

I created a very short video that demonstrates the steps for this setup. Note at the end of the video I’m also limiting the value filter control to only allow a single selection as multi select won’t make much sense in the context of the data label.

Ariel,
This is assume answer. picture are worth 100 words but videos are 60 pictures a second so 60,000 words a second for a (too much math) video answers are the way to go.

My only question is why will the label not change to “All” when “All” is selected?

When “All” is selected in the filter control, the data is retrieved for all the countries but grouped by country. If you were to re-visualize as a table or just open the data preview, you will see that the data is showing by country (and showing all countries). In that case where there are multiple values coming back, the data label visualization (being a label) will pick the first value from the returned results and show just that. You would probably want to disable the “All” option in this case (by hiding the token menu and hiding the “all item”) to avoid any user confusion. If you need the option to show all as well, you would probably need to move the dimension under the “SLICERS” instead of “ROWS” and then have a script that will read the filter value and populate a label accordingly. This script should be placed on the parameter value change interaction and the portion of getting the filter values via script should be similar to steps detailed here.

Thanks for the answer, now I just hope I remember that for the next time I use a Data Label like this. :crazy_face::elephant:

Is this video still available? I have the same question.