I can't figure out any way to preserve the palette choice, this is something that happens for regular discrete aggregates as well.
I've got 2.5 ideas:
1) There might be a way to pull this off with XML hacking, and it's unknown territory for me and I don't have time to try this out, here's the path I'd try:
a) start with a data source that leaves out some teams (for example by using a data source filter)
b) open the up the workbook in Tableau, set your color palette, save the workbook
c) open up the .twb and add more entries for more values of the color, save the .twb
d) alter your data source so you'll see more values, see if Tableau will use the ones you added to the .twb or not.
2) Rearrange your calcs so instead of using a discrete Team Name (text string), you can use a number and then some sort of sequential palette. If you're willing to use an existing sequential palette, you'll be all set.
2.5) For this version, you'd build your own sequential palette that helps guarantee more difference between the values, here's a nice blog post on sequential palettes by Robert Rouse, Understanding Sequential and Diverging Color Palettes in Tableau | InterWorks, Inc..
In the attached I set up a color calc that uses RANK_MODIFIED(MIN([Team Name]))-RANK(MIN([Team Name]))+1 to count the number of times each Team Name appears, and that returns the numeric Team Id (handy to have that) for only teams with >1 place in the list or else 0. Then a RANK_DENSE() on that calc creates a sequential number that a palette can be applied to.
There's a problem with this that the number of teams won't necessarily match the number of shades in your palette, however if you made a sufficiently large palette then you'd have a good chance of having different ones be distinct. Then to make a real color legend you could use a separate worksheet with square/circle/whatever marks to indicate the colors, see Color Legend with Totals: Save Real Estate, Keep Value | Tableau Software for one example.
coloring-the-dupes jtd.twbx 106.2 K
Just as I'd hoped, you've helped to simplify my table calcs. I knew I was way over sledge-hammering
Working with Robert Rouse's instructions, I've actually found the way to get exactly what I want. A distinct custom color palette, disguised as continuous, and one that I can apply to a measure pill.
I've described in colorful detail with a blog post:
Also note: in my final solution on the big production data set, it wasn't necessary to use a second table calc. Just the one used to identify the duplicate records was enough. The ID field works fine as a continuous value to drive the color assignments when 'use full color range' is selected (so no need to further apply a dense ranking to it).
Please find here the attachments.
Red Headed Step Data
For future adventures in colour space i suggest to visit these resources:
- ColorBrewer: Color Advice for Maps
- How to use Color Brewer based custom color palettes in Tableau?
the above post has attached a Preferences-colorbrewer.tps file
- Workaround to assign color by RGB measure : tableau
- GMT: Standard Colour Palettes for Relief Maps
- Wes Anderson Palettes.
One of the best paper on generating color palettes could be read here: Generating Color Palettes using Intuitive Parameters
On this subject Maureen Stone, Research Scientist at Tableau Software, a real expert on the field could teach you a lot of things.
Maureen Stone, "Designing Colors for Data" (slides), at the International Symposium on Computational Aesthetics in Graphics, Visualization, and Imaging, Banff, AB, Canada, June 22, 2007 http://www.stonesc.com/slides/CompAe%202007.pdf.
Heer, Jeffrey and Maureen Stone, 2012 "Color Naming Models for Color Selection, Image Editing and Palette Design", ACM Human Factors in Computing Systems (CHI) http://vis.stanford.edu/files/2012-ColorNameModels-CHI.pdf.