Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Text in chart expression help

Hi,

I have the following expression as 'Text in Chart'

=num($(vGrossSalesYTD)-$(vCancellationsYTD))-num($(vGrossSalesPTD) - $(vCancellationsPTD))

I want the background of the text to go red if the result is a negative.

Can anyone help me on how to do this using a calculated background please?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Use calculated Base color in your Color area dialog:

=if(

num($(vGrossSalesYTD)-$(vCancellationsYTD))-num($(vGrossSalesPTD) - $(vCancellationsPTD)) < 0,

,lightred()

)

View solution in original post

1 Reply
swuehl
MVP
MVP

Use calculated Base color in your Color area dialog:

=if(

num($(vGrossSalesYTD)-$(vCancellationsYTD))-num($(vGrossSalesPTD) - $(vCancellationsPTD)) < 0,

,lightred()

)