Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

How to show the different colors according to the various values?

Hi,All

I have a question like below

aa.png

According to the column Sum(Sales) ,I want to make the value>12 show red and the value<0 show blue.how to written in the exepression?

Thankyou!

Tags (1)
1 Solution

Accepted Solutions
Not applicable

Re: How to show the different colors according to the various values?

Hi,

under your expression (clik on the + ) you can enter an expression which will define color

Try this expression :

If(Sum(Sales)>12,LightRed(),If(Sum(Sales)<0,LightBlue(),White()))

Instead of LightRed() or LightBlue(), you can also use the rgb function

Best Regards,

Sarah

13 Replies
greeshma_k
Contributor III

Re: How to show the different colors according to the various values?

Hi,

You can do this in the visual cues tab.

Regards,

Greeshma

Not applicable

Re: How to show the different colors according to the various values?

Hi,

under your expression (clik on the + ) you can enter an expression which will define color

Try this expression :

If(Sum(Sales)>12,LightRed(),If(Sum(Sales)<0,LightBlue(),White()))

Instead of LightRed() or LightBlue(), you can also use the rgb function

Best Regards,

Sarah

awhitfield
Esteemed Contributor

Re: How to show the different colors according to the various values?

HI Li,

see the attached with examples of both methods.

HTH

Andy

thomas_kuler
New Contributor III

Re: How to show the different colors according to the various values?

Use color wizard according to your value

Qlikview ColorMix Wizard by RFB 169 - YouTube

Not applicable

Re: How to show the different colors according to the various values?

Hi li,

To add colour logic in Qlik Sense try the following:

- Click the Edit button

- Select the table

- On the properties panel (right hand side), find your measure eg Sales

- Expand the measure properties

- Scroll down to the "Text colour expression"

- Enter a formula based on the desired logic eg If(Sum(Sales)>12, RGB(255,0,0), RGB(0,255,0))

This should then add the colour logic and if you want the logic to be the cell background rather than the text colour then put the above formula into the Background colour expression field.

Hope this helps.

Kind regards,

Rod

Not applicable

Re: How to show  the different colors according to the various values?

Helpful

Not applicable

Re: How to show  the different colors according to the various values?

Thankyou!answered

Not applicable

Re: How to show  the different colors according to the various values?

Helpful

Not applicable

Re: How to show  the different colors according to the various values?

Helpful