Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

Convert 3 color script to 4 color for GP%

Hi All

After finish my work , i manage to think better and able to know what i want , So I think better i start a new posting , since my requirement have change.

I have the condition is below :- 

GP < 25 %  Color Red

GP <35 % >25% Green color

GP >35% Yellow

Mr Sutte give me the below script , which is working fine :-

If(GP% > 0.35,Yellow()

  ,If(GP% < 0.25, Red(), Green())

  )

 

Now I need to change the condition to add one more color for Organ :-

GP < 25 %  Color Red

GP <30 % >25% Organ color

GP <30 % >35% Green color

GP >35% Yellow

May i know how to modify the script for above new condition ?

I will post my QV sample in next posting.

Paul

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Try this expression.. (I don't have an idea about the Organ color, i just set as Blue(), you can change it)

If(GP% > 0.35,Yellow(),

  if(GP% > 0.3 and GP%<= 0.35,Green(),

  if(GP% >0.25 and GP% <= 0.3,Blue(),

  If(GP% <= 0.25, Red()))))


See the below screen shot, I selected the year as '2010'..

Capture.JPG


View solution in original post

2 Replies
settu_periasamy
Master III
Master III

Hi,

Try this expression.. (I don't have an idea about the Organ color, i just set as Blue(), you can change it)

If(GP% > 0.35,Yellow(),

  if(GP% > 0.3 and GP%<= 0.35,Green(),

  if(GP% >0.25 and GP% <= 0.3,Blue(),

  If(GP% <= 0.25, Red()))))


See the below screen shot, I selected the year as '2010'..

Capture.JPG


paulyeo11
Master
Master
Author

Hi settu

I have try to modify the color code to get red color and light green and your script is what i need , thank you very much.

If(GP% > 0.36,Yellow(),

  if(GP% > 0.33 and GP%<= 0.36,RGB(0,255,0),

  if(GP% >0.3 and GP% <= 0.33,rgb(254,184,0),

  If(GP% <= 0.3, rgb(255,0,0)))))

Paul