Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

How to make my chart appear 3 color ? Now only 2 color

Hi All

Now my Bar chart if more then 30% it turn light Blue. below 30% bar color Blue.

Now i like to make 2013 Bar now Blue change to red color ? when GP % below 20% Bar color change to red.

I will enclosed my QV Doc in my next posting

Paul

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

Due to Size of the file, i could not upload. But i just updated the above mentioned expression in the Background of Sales expression//

Capture.JPG

View solution in original post

26 Replies
settu_periasamy
Master III
Master III

May be this one

If(GP% <= 0.2 and Year=2013, RGB(255,0,0),

  If(GP% > 0.3,rgb(0,128,0)

  ,If(GP% < 0.15, RGB(255,255,98), RGB(0,255,0))

  ))

paulyeo11
Master
Master
Author

Hi Sir

Thank you for your sharing.

After I play round your script , it work fine. Since my condition is only 2 :-

GP % > 30 % yellow

GP % < 20 % Red

GP % between 20 % to 30 % Green

It is possible for you modify the expression to allow me enter only 2 value .

As now your script allow me enter 3 value.

Paul

Sent from my iPhone

settu_periasamy
Master III
Master III

Try this..

If(GP% > 0.3,Yellow()

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

  )

Don't you want include your Year field? In the first thread you mentioned, if year =2013, you need blue bar..

paulyeo11
Master
Master
Author

Hi Settu

I just try your script , all bar display blue Color .

I don't need add year =2013 as condition.

Paul

Sent from my iPhone

settu_periasamy
Master III
Master III

Hi Paul,

What about your selections? I don't see the blue color bar..

see the snap shot.

Picture1.jpg

paulyeo11
Master
Master
Author

Hi Settu

Can you send me the QV file ?

Paul

Sent from my iPhone

settu_periasamy
Master III
Master III

Hi,

Due to Size of the file, i could not upload. But i just updated the above mentioned expression in the Background of Sales expression//

Capture.JPG

paulyeo11
Master
Master
Author

Hi Settu

I think I know why , my mistake most likely is due to I shortage of one ) on the middle row of the script at the end .

Will test it

Paul

Sent from my iPhone

paulyeo11
Master
Master
Author

Hi Settu

Many thank , it work fine now. Very nice scripting

Paul

Sent from my iPhone