So I'm not aware of a way that Tableau can pick the colour from the field (by picking up the hex number of the colour).
Assuming you don't have too many, what I'd suggest is setting the default colour for each of your colour fields
To the hex value
Then use this field on the colour tile (rather than pass/fail...although you can keep this on the label)
Hope that helps
sample_sr.twbx 23.6 KB
Hi Shin, Thank you for the response. I did try that, but i see the following behaviors. 1. Assuming that i set the hex value from DB for each customer - grade combination and i created a calculated field appending the grade and customer, it started showing in the legends(like PASS-CUST2). But, i need legends with just the grade name. 2. Additionally, I captured this sample data to explain the problem statement. In reality, I have at least 200 grades spread across at least 50 customers and color code is a configurable value for each grade. But i can assure you that, all 200 grades(may get increased over time) falls with then 20 colors to meet the max 20 members rule in tableau color mark.
Getting confused a bit.
Could you clarify you request?
1. To differentiate the color, need to have different name, up to three color or something like that, you can use "PASS", "PASS.", "PASS " or something like that.
20 or mote ? Good luck.
2. What do you need on this? 200 colors cannot be recognizable from the begging by anyone....
Hi Simon, Thank you for suggesting this approach. I quickly tried this and progressed little step forward. But, I still could not get all the necessary items which are captured below.
- I set the color based on the default properties and i can see the color applied based on the setting. but the legends started showing the color name instead of the grade. Is there any workaround you suggest to show the legend with its respective color? If not, i can remove the legend for now. But the real problem would be the next one.
- I applied the default properties of distinct field value based on the data set i have at this moment. One additional requirement is that, this report pulls data set through live connection using Parameter. For example, when customer 1 view this report, this report gets the data set respective to customer 1 and render the report. When the customer 2 view this report, it gets the data set respective to customer 2 and render the report.
- I do not know how to set the default properties for each color that can be present across all customers. But, I see only 15 distinct colors possible across all customers.
Do you suggest any way? So that i set default color for each possible color hex value across customers.
I have attached the video which capture the new chart. thank you!
So on part one, we can do this by setting up a worksheet to act as the Legend ...I've coloured on colour, but labelled on grade and put this on the dashboard in place of the actual legend.
On part 2 ...tricky! So if when you are authoring the workbook, you remove the parameter filter so all Colours come into the datasource, you should then be able to set the colour up for every colour. You can now re-apply the parameter filter (albeit via SQL) and as people select a customer the workbook should hold the colour when it comes in (it should remember what the default colour is, when it see's that one again).
If you want to go even "hackier" you could edit the workbook (which is just XML). Here is the bit where the default colours are assigned
So you could open the workbook in a text editor and then add all the colours here (even future colours if you know them). NOTE before editing the XML you should take a copy as if anything goes wrong (easy to miss a closing />) it's unsupported by Tableau
Hopefully one of those options are do-able.
Pie Chart Colour Problem.twbx 25.7 KB