Here's a confession to start with.
I have absolutely spent an hour making a dashboard look slightly nicer while the analysis underneath was still, let's say, an open question. Better spacing, and a palette I kept fiddling with until it stopped annoying me.
None of it answered anything. It just looked calmer while not answering anything.
So when Tableau adds a new colour toy, I skip past "is it pretty?" and go straight to "does it do any work?"
Dynamic colour ranges are the most interesting answer I've had to that question in a while. And the honest version is: on their own, no. Used properly, genuinely yes. The gap between those two is what this post is about.
What the feature actually does
Start with a chart that already has a continuous measure on Colour. Click the colour legend to open the palette editor. Alongside the usual start, centre and end points, there's now an update on interaction toggle for each one.
Tick one and Tableau does something it almost never does. It builds you a parameter, builds you an action to drive it, and leaves them both sitting there for you to use. A little green note confirms it: "parameter and action created to enable dynamic colour ranges."
I'll call that the generated action from here on, because you didn't write it and it's the thing everything else hangs off.
You didn't build either of those. That's unusual enough to be worth a pause.
The default behaviour is sensible:
| Point you enable | What your selection sets it to |
|---|---|
| Start | the minimum of the marks you select |
| End | the maximum of the marks you select |
| Centre | the median of the marks you select |
Select a group of marks, the palette rescales to that group. Deselect, it goes back.
And that's the version you'll see in every demo. Click, colours move, everyone nods.
Which is lovely, and it is also a party trick. The colours move, but nothing has been learned. Neil said it plainly in the session, and it stuck with me: "How analytical is it, looking at colour? That's the thing."
He is right to ask, and it deserves a proper answer.
The Moving Middle
The useful idea isn't that the colours rescale. It's what you point the middle at.
A diverging colour scale needs a centre. Normally that centre is a fixed number you picked once, usually zero, or the average of everything, and then forgot about. Every mark gets judged against that one frozen benchmark forever.
The Moving Middle is the opposite. You let the user's selection decide what "average" means, right now, for this question.
Change what sits in the middle and you change the question the colour is answering. That's the whole concept. Everything below is just two good ways to use it.
Use 1: find the weak accounts inside a strong category
This is the build we landed on live, and it's the one I'd actually put on a dashboard.
Two sheets. On top, subcategories as a bar chart, coloured by profit ratio. That's your selector. Below, customers as a tree map, also coloured by profit ratio, with Centre set to update on interaction.
Wire the generated action so that picking a category up top sets the centre of the customer colours to that category's profit ratio. Have the same selection filter the customers too.
Now pick Paper, a category that already runs a healthy margin. Every customer sitting below Paper's own average turns red, and the further below, the darker. It is the most polite possible way for a tree map to tell you something you did not want to know.
Look at what just happened. The obviously bad categories can look after themselves. You're finding the underperforming accounts hiding inside a good one. As Steve put it in the session, it may be easier to lift rates on something like Paper than to fight the same battle on Tables.
You started with one question and ended up answering a better one, and the colour did the asking. The Moving Middle just went to work.
Use 2: keep the outlier without washing everything out
Second one, and it solves something most of us have handled with a shrug.
One extreme value stretches a diverging scale so far that the rest of your data sits in a pale, undifferentiated middle. The old fix was to hide the outlier, or filter it out, and hope nobody asked.
You don't have to do that now.
- On your scatter plot, open the palette and set start and end to update on interaction.
- Select the bulk of your marks, deliberately leaving the outlier outside the selection.
- The colour range stretches across the marks you care about.
- The outlier pegs at the darkest end and stays exactly where it was, still visible.
You keep the awkward point in the view and the colour still reads properly. No explaining six months later why a mark quietly went missing on your watch. Honest and complete beats tidy and edited, and this time you moved the ends rather than the middle.
The rule that caught us live
Say you want a selection on one sheet to recolour a different sheet on a dashboard. The generated action has to be sourced from the dashboard, not from the worksheet on its own.
Here's the bit that isn't obvious from the dialog. Tableau creates the action pointing at the sheet you were on, so it sits there listening to the wrong one. Head to the Dashboard menu and open Actions from there. You'll get a Source Sheets checklist rather than a single dropdown. Untick the target sheet. Tick the sheet you actually want to select from, and it fires.
Open the same action from a single worksheet's own Actions menu and that checklist won't offer you the other sheets at all. Which is why this looks broken rather than misconfigured.
This is exactly what tripped us up during the session, in front of everyone. If it gets you too, you're in respectable company.
(There's also the small matter of naming. Every toggle you tick creates Colour Centre 1, then Colour Centre 2, then Colour Centre 3, and a fortnight later you have a workbook full of parameters that definitely do something important...)
Rename them as you go.
How to Build This
Right, the prescriptive bit. Follow this on Sample Superstore and you'll have Use 1 working.
You'll need: Tableau Desktop with the update-on-interaction option on colour palettes. Continuous measure on Colour is required, this does not work on discrete.
Quick check before you start. Open any chart with a continuous measure on Colour, click the legend, and choose Edit Colours. Look for an update-on-interaction tickbox next to the start, centre and end points. No tickbox means your build does not have the feature yet, and nothing below will work. Better to find that out now than at Step 6.
Step 0. Check you have a profit ratio measure.
Look in the Data pane for Profit Ratio. Depending on which Superstore you're connected to, it may already be there as a calculated field. If it isn't, make one: SUM([Profit])/SUM([Sales]), name it Profit Ratio, and format it as a percentage. Every step below assumes it exists.
Step 1. Build the selector sheet.
New worksheet. Sub-Category on Rows, Sales on Columns as a bar chart. Drag Profit Ratio to Colour. Name the sheet Category Selector.
Step 2. Build the target sheet.
New worksheet. Customer Name on Detail, Sales on Size, Profit Ratio on Colour, mark type Square, which gives you the tree map. Name it Customer Detail.
Step 3. Turn on the moving centre.
On Customer Detail, click the Profit Ratio colour legend, then Edit Colours. Choose a diverging palette. Tick update on interaction on the Centre point only. Leave start and end alone for now.
You'll see the green confirmation and a new parameter appear, probably called Colour Centre 1.
Step 4. Rename it immediately.
Find it in the Parameters section at the bottom of the Data pane. Right-click, rename it to something you'll recognise in a month, for example Selected Category Profit Ratio. Do this now. You will not do it later.
Step 5. Assemble the dashboard.
New dashboard. Drop Category Selector at the top, Customer Detail below it.
Step 6. Fix the action source. This is the step people miss.
Go to Dashboard, then Actions, and find the generated action. Edit it. You'll see a Source Sheets checklist, not a single dropdown. Untick Customer Detail, which is where Tableau pointed it by default, and tick Category Selector instead. Set it to run on Select. Target parameter is your renamed parameter, and the value it passes is Profit Ratio.
Leave the aggregation as Median. Median is what Tableau uses for the centre point, and it matches the table further up this post. Switch it to Average and you get a different answer than the feature's own default. Fine if you meant to. Baffling if you didn't.
Step 7. Add the filter.
Add a Filter action from Category Selector to Customer Detail, run on Select, so picking a category also narrows the customers below.
Step 8. Test it.
Click Paper in the top chart. The tree map should filter to Paper's customers and recolour so that everything below Paper's own average profit ratio goes red. Deselect and it resets.
If nothing recolours, go back to Step 6. It is almost always Step 6.
The demo workbook: Dynamic Colour Ranges.twbx, the finished build from the session, wired and working. Worth opening and pulling apart.
๐ด One warning: it will not match the step names above. It was built live, at speed, on Sample EU Superstore. So before you go looking for something that isn't there:
| In the post | In the demo workbook |
|---|---|
| Sample Superstore | Sample EU Superstore |
Category Selector, Customer Detail | Sub-Cat PM%, Customers, Outliers |
| One dashboard | Two |
Profit Ratio | C: Profit Margin, same formula |
| Renamed parameters | ColorCenter, ColorCenter 1, ColorCenter 2, ColorStart 1, ColorEnd 1 |
It also carries an orphaned ColorStart and ColorEnd with no action wired to them, which is the naming problem above demonstrating itself on my own workbook. And there's a leftover Dashboard 1 holding Sheet 1 and Sheet 2 from an earlier attempt that used raw Profit. Ignore those two.
The mechanism is identical. The labels are not. Treat it as a worked reference, not as the answer sheet to the nine steps.
The variables, because yours won't match mine
Everything above uses Superstore, so treat these as your choices, not my prescriptions:
- The measure on colour. Profit ratio here. Could be margin, conversion rate, utilisation, defect rate, anything where above and below a benchmark actually means something.
- The benchmark you point the middle at. Category average here. Could be a selected team's target, a chosen cohort, last year's same period, or a peer group.
- What aggregation the action passes. Median here, which is Tableau's own default for the centre point. Average will give you the mean instead of the middle value, and that may suit you better if your categories are lumpy. Just change it deliberately rather than by accident.
- The grain of the two sheets, meaning the level of detail each one sits at. Category then customer here. Region then store, product line then SKU, and so on.
Get those four right for your data and the technique transfers cleanly. Get the last one wrong and you have built a very sophisticated way of colouring one mark.
Where it genuinely falls short
I'd rather you heard this from me than found it out at 5pm on a Thursday.
- The use cases aren't obvious. We said so live and I'll say it again here. It's a clever mechanism still looking for its best job. If you find a strong one, I'd honestly like to hear it.
- Continuous colour only. Discrete is out.
- Put start, centre and end all on Select at once and Tableau sets them all to the same value, so your whole viz goes one colour. Two ways out. Use a menu, so you pick which point you're steering. Or multi-select several marks, so it has a minimum, a maximum and a centre to read.
- The parameters pile up fast. Covered above, but it's the thing most likely to bite you three weeks later, in a meeting, with the workbook on a projector.
So is it pretty, or is it useful?
Both, but only in that order, and only if you do the work.
Left alone, it's automatic recolouring that looks impressive in a demo and changes nothing. Pointed deliberately, it turns colour from decoration into a question you can ask on the fly: compared to this benchmark, who's behind?
One of those gets you a "great, thanks". The other one changes how a decision gets made.
So pick one chart this week where the middle is currently a number you chose months ago and haven't thought about since. Make that middle move, and see whether the question gets any better.
-- Steve "Recovering Frozen-Benchmark Enthusiast" Adams
*PS: In The Insights Collective, Neil and I go down the rabbit holes on this stuff so you don't have to, then bring back the bit that's actually worth your time. Sessions, cheat sheets and the workbooks, ready to use the same week. There's a monthly way in now if you'd rather test the water than commit to a year. You're still a founding member, your price stays locked, and every past session and asset is yours from day one. โ https://vizdj.thrivecart.com/tic/*





