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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
bensomers
Contributor II
Contributor II

How to add colour to expression?

Hi experts,

Can anyone tell me how to adjust the below expression so that 'Pass' is green and 'Fail' is red?

=IF(Count({<SLAMet= {'Yes'}>} SLAMet)/Count(SLAMet)>.98,'Pass','Fail')

Thanks!

10 Replies
dwforest
Specialist II
Specialist II

Try using a dual()

instead of returning Pass / Fail, dual('Pass',1) / dual('Fail'),0)

In theory it will display the text but have the number for calculations just like dates