Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Woody
Contributor
Contributor

Variables Coloured text response

Hi,
 
I'm wanting to return coloured text based on the result of a calculation, see below.
 
 
=if(if([L_VOL] > [M_VOL] ,'Investigate','Pass')='Investigate',red(),green())
 
 
 
 
 
3 Replies
rubenmarin

Hi, if you have [L_VOL] nd [M_VOL] expressions it should work, if instead of expression these are fields I think you will need some aggreation like Sum([L_VOL])>[Sum([M_VOL])

That syntax can be simplified to:

If([L_VOL]>[M_VOL],red(),green())

This has to be set on the text color expression property of the table.

If it doesn't work give more info of what are [L_VOL] and [M_VOL] and where you are using this epxression

Woody
Contributor
Contributor
Author

Hi,

I'm wanting two outputs. Text in a colour.

 

If L_VOL > M_VOL then display 'Investigate' in red else display 'Pass' in green

 

 

rubenmarin

Hi, there is a place to set the measure and another to color the text.

The expression to show the text should be in the measure expression, the expression to color that text should be in the text color expression.

Measure expression: if([L_VOL] > [M_VOL] ,'Investigate','Pass')

Color expression: If([L_VOL]>[M_VOL],red(),green())