The Spotfire Community is moving to TIBCOmmunity and this forum location has closed. During the transition, you can still search the old forums but posting has been disabled. We encourage you to pick up the discussion at the new Spotfire community on TIBCOmmunity.
Conditional Coloring by Comparing Values in Multiple Columns - Tip of the Week

Tip of the Week

Conditional Coloring by Comparing Values in Multiple Columns

In previous posts, we have discussed the use of conditional coloring to color based off rules such as greater than, less than, top, and bottom. In this post, we will discuss how to apply conditional coloring when comparing values in multiple columns.


Let’s assume we have data about particular projects (although it could be data on anything). In this data table, we have columns for the "Planned Start Date" and the "Actual Start Date".

 

 
Suppose we want to conditionally color all values in the "Actual Start Date" column where the "Actual Start Date" is less past the "Planned Start Date"?  For this, we should first add a Color scheme grouping in our table visualization which includes the column we want to conditionally color on. In this case, it’s the "Actual Start Date" column.


We should then add a Coloring rule, with the Rule type being set to ‘Boolean expression’

 

For the value of the rule, we will enter a custom expression. In this expression we will check if the "Planned Start Date" value is less than the "Actual Start Date" value.
 



This expression is evaluated for each active row in the data table.  If the expression returns true, the "Actual Start Date" cell in that row will be colored.
 
 

Comments

 

Christof said:

Thanks for publishing this. It's not an obvious function, but still very useful.

May 13, 2010 6:59 PM
 

Cosworth said:

This looks nice, but what if we want to do similar thing on Cross Table? In this case we can not chose any column, only Axis.Color is available. Any idea how to do that?

June 7, 2010 8:30 AM
 

Rich Ellis said:

I second the notion about doing this with a Cross Table. Why is [Axis.Color] the only option for a custom expression in a Cross Table?

July 15, 2010 4:41 PM
 

victortam said:

Echo with Cosworth and Rich, I would like to do comparison with across the column I built in Cross Table. Any Ideas?

July 23, 2010 3:30 AM
 

stock tips said:

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in ifeed. Your theme looks lovely.Thanks for sharing.

Regards

<a href="www.arunthestocksguru.com/" " target="_blank" title="Stock Tips" >Stock Tips</a>

June 2, 2011 3:37 AM
 

stock tips said:

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in ifeed. Your theme looks lovely.Thanks for sharing.

Regards

<a href="www.arunthestocksguru.com/" " target="_blank" title="Stock Tips" >Stock Tips</a>

June 2, 2011 3:38 AM
 

stock tips said:

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in ifeed. Your theme looks lovely.Thanks for sharing.

Regards

<a href="www.arunthestocksguru.com/" " target="_blank" title="Stock Tips" >Stock Tips</a>

June 2, 2011 3:38 AM
 

Trade4Target said:

I absolutely adore reading your blog posts, the variety of writing is smashing.This blog as usual was educational, I have had to bookmark your site and subscribe to your feed in i feed. Your theme looks lovely.Thanks for sharing.

July 14, 2011 12:02 AM
 

mianzubair said:

Can we color the complete row based on the same boolean expression?

August 4, 2011 6:09 AM
 

uggkensington said:

http://www.uggkensingtons.org/

http://www.uggkensingtons.org/ugg-fox-fur-short-boots-5531-c-54.html | UGG Fox Fur Short Boots 5531

http://www.uggkensingtons.org/ugg-kensington-boots-5678-c-2.html | UGG Kensington Boots 5678

http://www.uggkensingtons.org/ugg-rainier-eskimo-boots-5189-c-85.html | UGG Rainier Eskimo Boots 5189

http://www.uggkensingtons.org/ugg-retro-cargo-boots-1895-c-3.html | UGG Retro Cargo Boots 1895

December 27, 2011 8:12 PM
 

uggskensingtonsale said:

www.uggskensingtonsale.org

www.uggskensingtonsale.orgugg-adirondack-boots-ii-c-6.html | UGG Adirondack Boots II

www.uggskensingtonsale.orgugg-adirondack-tall-boots-c-11.html | UGG Adirondack Tall Boots

www.uggskensingtonsale.orgugg-amberlee-boots-c-34.html | UGG Amberlee Boots

www.uggskensingtonsale.orgugg-annabelle-boots-c-35.html |

December 28, 2011 4:02 AM
 

uggretrocargosale said:

January 4, 2012 8:49 PM
 

Filippo said:

HI.

I have the same problem as Cosworth.

How to do this in a cross table? i see only Axis.Color !

Please help!

Thanks in advance.

Kind Regards

April 2, 2012 8:22 AM
 

facco said:

Cosworth, Rich, victortam and Filippo, the only way I found to do this in a cross table is to create a third column of type boolean that compares the first two (it can also be a numerical column if you compute the delta). so now you can create your own column scheme related to the third column, e.g.: green for "TRUE", red for "FALSE".

I used it with the color gradient funtion and I associated it to the delta, so when delta is >0 (col2>col1) color comes to green, otherwise (col2<col1) color comes to red.

You don't use the same column but I think the visual effect is impressive enough.

[c1] [c2] [delta (c2-c1)]

1        5   (green)

3        2   (red)

4        4   (white)

.......

Hope you understand all.

Luca Facchetti

Festo Italia

September 18, 2012 12:51 AM
 

Stover said:

Marvelous, what a web site it is! This weblog presents helpful information

to us, keep it up.

August 2, 2013 2:26 PM
 

Barlow said:

We're a group of volunteers and starting a new scheme in our community. Your web site provided us with valuable information to work on. You've

done an impressive job and our whole community will be grateful to you.

August 5, 2013 2:26 PM
 

Book said:

I just could not depart your website prior to suggesting that I extremely enjoyed the usual information an individual supply for your visitors?

Is going to be again regularly in order to check out new posts

August 6, 2013 10:38 AM
 

Stock said:

My brother recommended I might like this web site. He was totally right.

This post actually made my day. You cann't imagine just how much time I had spent for this info! Thanks!

August 7, 2013 1:14 AM
 

Mcginnis said:

Magnificent items from you, man. I have consider

your stuff previous to and you are simply too magnificent.

I really like what you have acquired right here, certainly like what

you're saying and the best way during which you assert it. You are making it enjoyable and you continue to care for to keep it wise. I can not wait to learn far more from you. This is actually a tremendous website.

August 12, 2013 2:16 AM
 

Mckinley said:

Pretty! This has been an incredibly wonderful article.

Thank you for supplying this information.

August 18, 2013 3:52 AM
 

Kirkpatrick said:

Write more, thats all I have to say. Literally, it seems as though you

relied on the video to make your point. You clearly know what youre talking about, why throw away your intelligence on just posting videos to your

weblog when you could be giving us something informative

to read?

August 19, 2013 8:43 PM
 

Silverman said:

Having read this I thought it was very informative.

I appreciate you taking the time and energy to put this content together.

I once again find myself spending a lot of time both reading and posting comments.

But so what, it was still worth it!

August 20, 2013 3:57 AM
 

Dell said:

Great website. Lots of helpful info here. I'm sending it to a few pals ans also sharing in delicious. And naturally, thanks on your effort!

August 21, 2013 4:01 PM
 

Braun said:

Truly no matter if someone doesn't understand then its up to other visitors that they will help, so here it occurs.

August 26, 2013 1:08 AM
 

intradaytips com said:

We want you to thank you for such outstanding information on your blog. http://www.intradaytips.com

September 10, 2013 10:03 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit

Syndication

Other Spotfire Blogs

©Copyright 2000-2011 TIBCO Software Inc | Privacy Policy | Terms of Use I Blog I Contact Us I Content Center