Explore Courses Blog Tutorials Interview Questions
0 votes
in BI by (17.6k 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 (47.2k 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

Related questions

0 votes
1 answer
0 votes
1 answer
asked Dec 10, 2020 in BI by Chris (11.1k points)
0 votes
2 answers
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

29.3k questions

30.6k answers


104k users

Browse Categories