0 votes
1 view
in BI by (13.4k points)

What I am looking for is to assign a color palette to a subcategory. I haven't found any information online for my problem. I'll explain using dummy values:

Imagine I have school data, with teachers, students and janitors names. On the database, their names are preceded by their job at school (eg: prof-John, st-Trinity, func-Manuel). The purpose is to build a graph with the years on the job of each person. It is possible to create a calculated field and assign blue to teachers, red to students and green to janitors using the contains function. However, I want to distinguish (in the graph) each person within its job, assigning instead of the color blue for teachers, a blue palette for teachers and follow the same idea for students and janitors.

Does anyone know how to do it? Thanks in advance

1 Answer

0 votes
by (36.7k points)
  • The easiest approach is to make sure you have two discrete (i.e. blue) fields, usually dimensions. Say one is a profession and one is years in the job bin. You can use the create bins command to create a discrete bin dimension based on the years of the job measure. You can adjust the bin size by editing the bin field.

  • Then you can place two discrete fields on the color shelf if you hold down the SHIFT key when adding the second field. In that case, Tableau will create a combined field and assign colors intelligently. Color assignments can be edited by double-clicking on the color legend.

Here is an example.

enter image description here

...