Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How to set RGB for negative values

I have this column called cost and I have to set rgb based on the below criteria.

If cost > 0 then Green

if Cost = 0 to -5 then Yellow and if Cost < - 5 then Green.

How can I write this in calculated condition in color ?

Thank you.

5 Replies
Highlighted

Re: How to set RGB for negative values

Hi,

Try below expression,

If(cost >0 or cost <-5 , LightGreen(), Yellow())

Highlighted
Not applicable

Re: How to set RGB for negative values

My bad...below is what I want.

If cost > 0 then Red

if Cost = 0 to -5 then Yellow and if Cost < - 5 then Green.

Highlighted

Re: How to set RGB for negative values

I guessed it. 

If(cost>0, Red(), If(cost <= 0 and cost >=-5, Yellow(), If(cost <-5, Green())))

Highlighted
MVP & Luminary
MVP & Luminary

Re: How to set RGB for negative values

HI,

Try like this

=If(cost > 0, Green(),

if(cost >= 0 AND cost <= -5, Yellow(),

if(cost < - 5, Green())))

Regards,

jagan.

Highlighted
Specialist III
Specialist III

Re: How to set RGB for negative values

Dear Tamil,

Here is a condition for your RGB Colors, please use

Condition:

=If(Cost > 0, Red(), If(Cost < (-5), Green(), Yellow()))

Your Requirement:

If cost > 0 then Red

if Cost = 0 to -5 then Yellow and if Cost < - 5 then Green.

Kind regards,

Ishfaque Ahmed