5 Replies Latest reply: Dec 30, 2014 3:38 AM by Beaulieu Mathieu

# Table, background color from two lines condition?

Hi,

I've this table (picture below) and i want to set cells background to red if  "Livraisons" from "2014" are < "Livraisons" 2013.

I've tried Set analysis and many things but i can't find the answer.

I suppose that i must write expression here :

I thought to search value in table from year 2013 but i don't know how to do this in expression...

Could you help me?

• ###### Re: Table, background color from two lines condition?

Try something like

if ( above(Livraisons) < Livraisons , red() )

See attached qvw.

• ###### Re: Table, background color from two lines condition?

HI Beaulieu Mathieu

Try this way

if(Sum({<year={2001}>}sale)<= 200, RGB(0255,0,0),RGB(0,255,0))

if(Sum({<year={2002}>}sale)<= 200, RGB(0255,0,0),RGB(0,255,0))

• ###### Re: Table, background color from two lines condition?

Your test is OK, but in my case, i have to replace 200 by the other year (year - 1) and i don't want to do the Sum of sales... I just want show values from field "Livraisons"

if(Sum({<year={2001}>}sale)<= 200, RGB(0255,0,0),RGB(0,255,0))

An idea?

• ###### Re: Table, background color from two lines condition?

Ok, It's working with "Below" function.

Thank you.

• ###### Re: Table, background color from two lines condition?

hi,

you can use the attached one.

!