-
1. Re: Dynamically adjust map color range
Simon RuncSep 13, 2017 8:43 AM (in response to Alastair Matheson)
-
2. Re: Dynamically adjust map color range
Alastair Matheson Sep 13, 2017 8:49 AM (in response to Simon Runc)I have looked at diverging a little but that still requires manually setting the start and end points of the range, right? I basically need some dummy values to force Tableau to have a wider range, but the dummy values need to vary based on the filter selection.
-
3. Re: Dynamically adjust map color range
Simon RuncSep 13, 2017 9:18 AM (in response to Alastair Matheson)
Yes I see what you mean...What about this?
I've created one calculation to pick up the mid-point of any Indicator
[Percent Range - MidPoint]
{FIXED [Indicator]: MIN([Percent])}
+
(({FIXED [Indicator]: MAX([Percent])}
-
{FIXED [Indicator]: MIN([Percent])})/2)
btw I feel there is a simplified version of this calculation...but late in the day here, so brain is running on fumes! (it works...so I stopped!)
and then another calculation, which we use for colouring, which is the distance from the "Mid Point"...
[Percent Colour - Distance from MidPoint]
[Percent]
-
[Percent Range - MidPoint]
We can then use this on the colour self, and set the range we want...
This way you can choose "how far from a dynamic midpoint you want to distinguish by shade"
There are also many variations (distance from average, SDs [as you've already mentioned]...etc.)
Hope that works (and makes sense)
-
Dynamic map color range - SR.twbx 253.6 KB
-
-
4. Re: Dynamically adjust map color range
Alastair Matheson Sep 13, 2017 3:17 PM (in response to Simon Runc)Thanks. That gets me a lot of the way there. I set things up to work with the standard deviation so that manually inputting the range was less important (3 SDs either side of the mean seemed to hit the right balance) (see the Twomaps sheet).
The one major remaining issue is to display the actual percents that the range corresponds to rather than the deviation. Is there a simple way to do that?
-
Dynamic map color range - SR_AM.twbx 252.8 KB
-
-
5. Re: Dynamically adjust map color range
Simon RuncSep 14, 2017 1:30 AM (in response to Alastair Matheson)
3 of 3 people found this helpfulExcellent...yes that works really well
So it terms of a legend which reflect the actual values...
One way to do this is to set up the legend from another sheet. Below is the set up for the bar chart which will act as our legend.
Notice that;
the Std Dev From Mean is used as a Dimension...this means I get a mark [bar] for each unique value
The MIN 0.9 and 1 Dimension (which is set to not show header) is so the bars fill the entire screen
The Axis is also reversed
The Label is set up to display MIN and MAX
The really cool thing about making the legend from a sheet...is that we can set actions from the legend to the map...
This is actually a really useful technique (and not really thought about doing it this way before)...I feel a blog coming on!
-
6. Re: Dynamically adjust map color range
Alastair Matheson Sep 14, 2017 8:33 AM (in response to Simon Runc)Great idea. Thanks, that works really well.