Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN 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()

)