Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color By Expression Question!!!

This is my current color expression:

if([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L' or [Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S' or [Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', lightred(), lightgray())

Which gives me this...

However, I want to be able to give it a color range.

I want "N" to be lightred() and I want S to be an ORANGE color and L to be yellow().

How do I write or modify the above expression to get that?

1 Solution

Accepted Solutions
sunny_talwar

You can use ARGB() function to use a variation...

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', ARGB(150, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', ARGB(200, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', ARGB(255, 255, 0, 0), LightGray())))

You can play around with the first argument of ARGB() to make it brighter or lighter. Higher number is brighter, and lower number as lighter

View solution in original post

6 Replies
sunny_talwar

May be this

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', Yellow(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', RGB(255,128,0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', LightRed(), LightGray())))

Not applicable
Author

Hi Sunny,

Okay, that worked. But I don't actually like the feel of it like I thought I was going to.

If there a way to do a variation or lightred? So N would be light red and S would be a little lighter then lightred and S would be the lightest?

sunny_talwar

You can use ARGB() function to use a variation...

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', ARGB(150, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', ARGB(200, 255, 0, 0),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', ARGB(255, 255, 0, 0), LightGray())))

You can play around with the first argument of ARGB() to make it brighter or lighter. Higher number is brighter, and lower number as lighter

Not applicable
Author

Thank you SUNNY!

Not applicable
Author

Hi Sunny,

I searched this post hoping to find an answer (similar to what you did for Lauren).

Instead of color ranges, i tried to substitute with colors:

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='L', purple(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='S', green(),

If([Fundamental Towing & Job Rating with iShowroom (SSJR03WB)]='N', darkgray(), LightGray())))


When I did so, it didn't work what am i doing wrong?

Thanks!

amonjaras
Partner - Creator II
Partner - Creator II

Hello Pauline,

purple() is not a valid color function. You can try cyan() instead.

Regards.