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: 
Anonymous
Not applicable

Turning negative values red

Hi,

How can I turn the negative values in one of my columns red?

Can I write something in the format pattern?

Thanks.

/ Madeleine

8 Replies
priyalvp24
Creator
Creator

Hi,

In your Background Color expression write

If(datafield<0,red())

Thanks,

Priyal

Miguel_Angel_Baeyens

Depends on the type of chart but in tables you can set the Text Color Expression or Background Color Expression to something like RGB(255,0,0)

Any expression valid in Qlik which returns a color with RGB() or ARGB() will work.

Anonymous
Not applicable
Author

Hi Miguel,

I tried writing RGB(255,0,0) in the Text color expression but then all numbers turned red. How can I turn only the negative numbers red?

/ Madeleine

priyalvp24
Creator
Creator

Hi,

In your Background Color expression write

If(datafield<0,red())

Thanks,

Priyal

Anonymous
Not applicable
Author

Hi,

This doesn't seem to work for me as my net amount column is a master item and not a datafield.

/ Madeleine

Miguel_Angel_Baeyens

As mentioned above, using any expression which returns a color will work, in your case:

If(Sum(Sales) < 0, Red(), Black())

Assuming Sum(Sales) is your expression.

Anonymous
Not applicable
Author

The column is biult up by a master item so your suggestion sadly doesn't work.

The app was created by a consultant and I thought that I could just make the change in the format pattern or text color expression.

Miguel_Angel_Baeyens

You can click on the link icon on the item to remove it from the master library and see the expression. You can still use the expression to change the color, but you need to know the expression, of course.