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

Colors based on Value

Hi All,

I have the following data in My table. Can we display Sales background color like

10-40 red

50-70 Green

80-100 Blue

Year     Sales

2005     10

2006     20

2007      30        

2008      40

2009     50

2010      60

2011     70

2012    80

2013     90

2014    100

Regards

Sharath

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You can play with the Properties | Visual Cues, or set a foreground colour expression (Text Color) in Properties | Expressions:

     =If([Sales] >= 10 And [Sales] <= 40, Red(),

     If([Sales] >40 And [Sales] <= 70, Green(),

     If({Sales] > 70 And [Sales] <= 100, Blue())))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
sunny_talwar

I think you should be able to do this for Text Color Expression:

If(YourSalesExpression <= 40, Red(), If(YourSalesExpression <=70, Green(), Blue()))

Anonymous
Not applicable
Author

you may be succesful using tab visual clue where you can define your Background as well as your textcolor

jonathandienst
Partner - Champion III
Partner - Champion III

You can play with the Properties | Visual Cues, or set a foreground colour expression (Text Color) in Properties | Expressions:

     =If([Sales] >= 10 And [Sales] <= 40, Red(),

     If([Sales] >40 And [Sales] <= 70, Green(),

     If({Sales] > 70 And [Sales] <= 100, Blue())))

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
alibd225
Creator
Creator

=if(sum(Sales)<41,Red(),if(sum(Sales)<71 and sum(Sales)>40,Green(),Blue()))

alibd225
Creator
Creator

this is text color not background color..

expand your expression by clicking + sign. then write condition in Text Color not background color

Not applicable
Author

Thanks for all

alibd225
Creator
Creator

if you already got your ans then click correct answer and close your discussion