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: 
dinicholls
Creator II
Creator II

Colour in an Expression

Hi,

I have an expression in my QV app, and this might sound a bit simple, but I want the result in my pivot table to be red, if less than 0, and black if not.

I know about the '+' sign next to the expression name, but have never really used it.

If I wanted to do the above, would I have to repeat my expression in the 'Text Colour' field, or can I just add in <0, Red(), black().

This if my formula in my expression field:

if(Company=29,(sum([Line Debt])/100*$(Medical)),

if(Company='100D',(sum([Line Debt])/100*$(Pest)),

if(Company='100K',(sum([Line Debt])/100*$(Wash)),

if(Company='100F',(sum([Line Debt])/100*$(Hygiene)),

if(Company='100Z',(sum([Line Debt])/100*$(Ambius)),0)))))

Thanks

Di

1 Solution

Accepted Solutions
Not applicable

Hi DiNicholls,

Here you must have to write expression in the background color which appears when you click on the + sign.

Expression to be written is if(Line<0,Red(),Black())   where Line is the Label of you expression.

Please fine the screen shot for the same.Line Debt.png

View solution in original post

6 Replies
Anonymous
Not applicable

Just adding in <0, Red(), black() should suffice.

Give it a go and tell us whether or not you have success.

yduval75
Partner - Creator III
Partner - Creator III

Use visual cue tab and put a color if lower than 0

Not applicable

Hi DiNicholls,

Here you must have to write expression in the background color which appears when you click on the + sign.

Expression to be written is if(Line<0,Red(),Black())   where Line is the Label of you expression.

Please fine the screen shot for the same.Line Debt.png

richard_chilvers
Specialist
Specialist

Hi Diane

Visual Cues in Properties work best for simple highlighting. I think this will work OK for you. Otherwise the '+' gives more variety (eg. cell background) but sometimes you need to hunt around for documentation on how best to use the features (eg. bold font). This community is a good source.

dinicholls
Creator II
Creator II
Author

Thank you all!

Didn't realise it was that simple!

Not applicable

Its ok. The more we post, More we learn.