Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Force negative numbers in red

Hello,

I'd like to keep the negative numbers in red color when I change the font color using the "Text Color" proprerty; in other words, I'd like to change the font color in an expression only for positive numers.

The formula I set in the Text Color property is something like that:

If(Condition1,Green(), Yellow())

Can I set the red negative numbers formatting in the Format Pattern setting something like this?

€ #.##0;[red]-€ #.##0

Thks.

N.

1 Solution

Accepted Solutions
rubenmarin

Hi, you can use the column name, or the Column() funtion, ie:

If([Column Name]<0, Red(), Green())

View solution in original post

6 Replies
Colin-Albert
Partner - Champion
Partner - Champion

The format pattern can change the format of negatice numbers e.g. -123 or (123), but does not change the colour. You will need to use the Text Colour property on the expression by clicking [+], or use Visual Cues

Anonymous
Not applicable
Author

...I've tried to follow the suggestion, but the Visual Cues options are overwritten by the Text Color option in the expression, so I can't use them.

Using the Text Color option in the expression, I'd like to know how it is possible to set them testing the Expression Formula without replace it into the Text Color Formula (so that I shouldn't manage the same formula in two different places).

Hope it's clear...

Thanks.

N.

rubenmarin

Hi, you can use the column name, or the Column() funtion, ie:

If([Column Name]<0, Red(), Green())

Anonymous
Not applicable
Author

Thank you so much. 🙂

N.

vikasmahajan

if you are using straight table you can use visual cues  please see attached image.

HTH

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Anonymous
Not applicable
Author

I know it, Vikas, but the Visual Cues is incompatible with the Text Property set into the Expression: e.g if I set the Text property of the expression as White() and I set the negative numbers in Red when they are negative into the Visual Cues, they will apper always white!

N.