Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Join us March 10th, 7 Ways Modern Analytics Can Help You Take Smarter Action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anil529106
Contributor III
Contributor III

Conditional formatting in text box in qliksense

My requirement is, in Qliksense text & image box, when value is in +ve, it will show in green (1000+) and when value is in -ve then it will show in red (150-).

current output:

1000+ Current Month (Dec 2017)

150- Last Month (Nov 2017)

Expected output:

1000+ Current Month (Dec 2017)

150- Last Month (Nov 2017)

4 Replies
rubenmarin

Hi Anil, for that format I think you will need 2 expressions for each row, one for text in red and other in green.

The expressions can be:

Current Green: If(CurrentMonthExpression>=0, CurrentMonthExpression, '')

Current Red: If(CurrentMonthExpression<0, CurrentMonthExpression, '')

Last Green: If(LastMonthExpression>=0, LastMonthExpression, '')

Last Red: If(LastMonthExpression<0, LastMonthExpression, '')

anil529106
Contributor III
Contributor III

Thanks for replying.

But as per the expression you provided, how it will change the color of the expression result?

Ivan_Bozov
Luminary
Luminary

I think that changing the color dynamically is currently not available in Qlik Sense for text & image charts. You can use KPI object and go to Apperance > Color > Conditional color and set limits and colors.

rubenmarin

Hi Anil, it will not change colors:

For each value you have a red and a green expression, if it's below 0, the red expression shows the value, the green expression has an empty string (so it's not visible). If the expression is above zero, the green expression shows the value and the red one has an empty string. It simulates than the expression is changing colors.