12 Replies Latest reply on Jan 10, 2017 12:29 AM by Norbert Maijoor

# Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Tableau Community,

Trying to change the color of the marks based on the difference between the male and female income in the box-and-whisker chart on Sheet 16.

Any guidance will be greatly appreciated!

Thank you

Rob

• ###### 1. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Good evening Rob,

Find my approach based on two sheets as reference below and stored in attached workbook version 10.1

One of the "dis-satisfiers" of this approach is the fixed axis;)

1 of 1 people found this helpful
• ###### 2. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Rob,

This is not ideal way, but one solution.

Add Female(or Male)'s data as 2nd axis and change the color plot 100% transparent.

And add box Plot with different color.

Which overwrite only female..

Thanks.

Shin

1 of 1 people found this helpful
• ###### 3. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Norbert,

Thank you!

I like the look.

It's a great option. Using two different sheets creates a lot of flexibility it seems.

I was hoping to use the "line" mark and make the individual mark one color if the male income was higher and another if the female income was higher. That would highlight how infrequent that scenario is.

Thoughts?

Rob

• ###### 4. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Shin,

Thanks very much for taking time!

This is great look as well.

Any thoughts on my comment to Norbert.

Hoping to make the line mark one color if the male income is higher and another if the female income is higher.

Best,

Rob

• ###### 5. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Hi Lob

Here you go.

[Line Color]

if ({fixed [Occupation]:sum(if [Gender]="Female" then [Average Taxable Income \$] else 0 end)}

-

{fixed [Occupation]:sum(if [Gender]="Male" then [Average Taxable Income \$] else 0 end)}) >=0 then

"Red" else "Blue" end

Thanks,

Shin

• ###### 6. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Hi Shin

In which workbook did you deveop the following viz

• ###### 7. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

In previous attached. "new"

• ###### 8. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Hi Shin,

Checked the file but could not find the version with two different colour shading for the box

• ###### 9. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Norbert,

I don't know the reason, but attaching V3.

Could you check "new" sheet again?

Shin

1 of 1 people found this helpful
• ###### 10. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Shin,

That's it. The "Fixed" level of detail calculation is new for me. Good insight. Thank you for your help. Much appreciated!

Rob

• ###### 11. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Rob,

That's right, but too say more carefully, the combination of LOD and IF STATEMENT is a key.

LOD is powerful as simple usage, but combining with If statement, becomes more flexible.

But at the same time, complication is added until you go thru lesson/learnt process.

Thanks,

Shin

• ###### 12. Re: Conditional Color Change in Box-and-Whisker Tableau 10 Desktop

Goodmorning Shin

Sorry to bother you. Opened the file again and found this on sheet "New".

Strange;) Both boxes have still the "colour".....