This should be doable, but how will depend on your data. Can you share a sample?
We only have 3 people, 1 is woman and 2 men. So I just want to depict a info-graph. If you can help me out I would appreciate!
Okay, I'll assume your data looks something like this:
Person ID Gender 1 Male 2 Male 3 Female
Connect to the data in Tableau. Make sure Person ID is a dimension, then drag it to the detail card. Next create a parameter, which I'll call Select Gender with two options: Male & Female. Then create a calculated field:
// Specify the color based on selected gender.
IF [Gender]=[Select Gender] THEN
Drag Color to the color card and make sure the pill is above the Person ID pill. Then set the Color pill to sort alphabetically descending. This will make sure that blue is always the first color. Finally, specify your colors for each of the two options.
Gender.twbx 572.2 KB
aaaaa.... Thank you so much!