Hi everyone, I’m working with a map chart in Tableau and I’ve set up the necessary actions so that it responds when I click on a region.
However, I’d like to create a dynamic text label that changes based on whether an area on the map is selected or not.
Example scenario:
No region selected:
Text: “Respondent Demography [USA]”
If a region is selected (e.g., Arizona):
Text: “Respondent Demography [Arizona]”
What I’ve tried so far:
I already have map actions working for filter, highlight, and the data, but I’m not sure how to make the text label update dynamically based on the selection.
I’m thinking about using a calculated field or parameter, but I’m not sure how to set it up correctly.
My questions:
- How can I create a dynamic text that updates based on the selected state/province in the map chart?
- Do I need a calculated field for this?
- Or is there another approach (like parameters or dashboard actions) that I should be using?
Thanks in advance for your help!
Hi, @Raden Bagus Rifai Kacanegara
Are you looking for something like the attached? Please check.
I used parameters and parameter actions.
When a state on the map is clicked, the parameter changes to 'Selected State,' and the label on the dashboard displays the state name. When the click is released, the parameter changes to 'ALL,' and the label on the dashboard displays 'USA.'
<sample>
The colors shown are dummy and represent quantities.
<parameter>
<parameter action>
<calc>
<dashboard & sheet>
*If you get the best results from this exchange, I would appreciate it if you could choose the best answer or upvote.