KNOWLEDGE BASE

How to Highlight the Plot on Map Based on the Selection from Another Worksheet after Selecting a Range of a Few Map Plots.


Published: 13 Jul 2023
Last Modified Date: 14 Jul 2023

Question

How to highlight the plot on map based on the selection from another worksheet after selecting a range of a few map plots.

Environment

  • Tableau Desktop

Answer

1. Create a map by adding [State] and [Country] to [Details] Marks Card.

2. Create a crosstab called [StateList] by adding [State] to the Rows Shelf and adding SUM([Profit]) to the Text Marks Card.

3. Add [Map] worksheet created by step1 and [StateList] created by step2 to Dashboard.

4. Move back to [Map] sheet, Create a Parameter called [State] as below.
・Name: State
・Data type: String
・Allowable values: All


5. Move to [Dashboard] and click on the menu [Dashboard] > [Actions].

6. Click on [Add Action]> [Change Parameters] from the action setting menu.

7. Set the parameter actions like below and click on [OK] to save the changes.
・Name: Highlight Plots
・Source Sheets: StateList
・Run action on: Select
・Target Parameter: State
・Clearing the selection will : Set value to > All
User-added image


8. Move back to [Map] worksheet.

9. Create a calculation field named [For highlight]
IF [State]=[Parameters].[State] THEN 1000000000000
ELSE 0

10. Create a calculation field named [Sales(Highlighted)]
SUM([Sales])+SUM([For highlight])

11. Add [Sales(Highlighted)] to [Color] Marks Card.

12. Move back to [Dashboard] and select a range of map plots then highlight the target plots by clicking on the crosstab [StateList].

Please refer to the attached Sample.twbx for further details.

 
Did this article resolve the issue?