Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
stjernvd
Partner - Creator
Partner - Creator

Errors with Red and Green background for if statement

Hi,

Depending on my if statement I would like a red and green background for the values, but when I use this equation it doesn't work, I am using this statement in the background drop down in the expressions tab in a straight table...

if(Match([Tool Entity],'Eduroam','Lse')=0,Green(),if(Match([Tool Entity],'Eduroam','Lse')<>0,Red()))

So I want for the values for fields 'Eduroam' and 'Lse' within the main field [Tool Entity] to be green when = 0 and I want them to be red when they are not equal to 0.

What am I doing wrong?

11 Replies
Not applicable

stjernvd,

try something like:

IF( ( [Tool Entity]='Eduroam' OR [Tool Entity]='Lse' ) AND SUM(Sales) <> 0 , Green(), IF( ( [Tool Entity]='Eduroam' OR [Tool Entity]='Lse' ) AND SUM(Sales) <> 0 ,Red()))

Marc

Gysbert_Wassenaar

Maybe like this: If(match([Tool Entity],'Eduroam','LSE', if(sum(Position), red(), green() )). You will have to disable the Suppress Zero-Values option. Otherwise records where sum(Position) is 0 won't be shown.


talk is cheap, supply exceeds demand