# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$400 before Dec 31st: REGISTER NOW!
cancel
Showing results 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
MVP

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

6 Replies
MVP

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?

MVP

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!