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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
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()

)