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

change of data colors on map with expression

Hello I need create an expression that displays data in colors that change according to it's values, for exemple red if it's negative and green if it's positive, I have created the expression and added the condition in the background color section of the expression but it doesn't seem to work, QlikView forces the default colors. what should  i do. the condition is

if(expression>=0, green(), red())

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

You need to put the expression in your Longitude expression (the first one)

View solution in original post

12 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

What's the expression?  Can you post your app?

Not applicable
Author

You Can Try This

Go

Expression>Text Color

or

Font>Bsse Color> Calculated

then Enter expression (if(expression>=0, green(), red()))

Not applicable
Author

Sorry I can't upload the App but the expression is similar to if(sum(sales)>=0, green(), red()).thank you for your reply

Not applicable
Author

You Write  expression  on


Expression>Text Color

or

Font>Bsse Color> Calculated


Not applicable
Author

thank you so much  for your reply , but it didn't work either.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Is it a simple straight table chart?  Single dimension?

Not applicable
Author

thank you  Jason,  no it's a map actually and the expression is represented as points of different sizes.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

You need to put the expression in your Longitude expression (the first one)

Anonymous
Not applicable
Author

Hi,

Try: if(column(1)>=0, green(), red())

... but of course use the right column number.

I think you may have put the formula about the colour in the wrong place... Is it under the expression itself in the background subsection (where it should be)? Or in the colour pallete, or somewhere else?

Are you using grid chart or scatter chart? If scatter - make sure the colour formula is set for the 1st expression, the one that appears on the x-axis.

Dilyana