I have moved one more step now as I have taken duplicate sheet and added condition like below
case [Select Metric]
when 'Exports' then 'Green'
when 'Imports' then 'Red'
Changed the metric color to Metric 1(Green-->Red) and Metric 2(Red-->Green). This is displaying colors in Map what I expected, but Legend have issue.
Both Map legends are display one legend is fine with data but another legend display Null which need to hide.
Attached sample dashboard.
Is there a possibilities to show or hide legends based on selected metric or change legend color based on selected metric ?
Color display1.twb.zip 94.2 KB
We can approach issues in Tableau using different methods. I noticed you built two graphs when only one is required to get the visualization I believe you want. I tried a few attempts to get the key to hide when the secondary graph is shown but it always presents a null key.
So I backed up and took a new approach...
- Build one map
- Made a custom calculation to make "exports" a negative number
- Left "imports" as positive
- Set color scale from -1 (red) to 1 (green) with 0=white
- Left all your filters the same
Check out the attached workbook as an example. Check out the new dashboard I created to see how I approached. Hopefully this will get you moving down the right path.
Let us know if this was helpful or not.
Color display1.twb.zip 142.5 KB