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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Omkar13
Contributor III
Contributor III

Change text box Bg color based on string values

Hi experts,

I want to change the bg color of text box based on String value. I have 4 string values for priority Critical, High, moderate  and Low and bg color are Red, Yellow, Green and blue respectively.

I was able to achieve similar on table values based on measure and adding if condition but it doesn't seems to work with text box bg. Does anyone know a solution for this?

Labels (3)
2 Solutions

Accepted Solutions
Omkar13
Contributor III
Contributor III
Author

Solution:
 
=if(Priority = '2 - High', red(), If(Priority ='1 - Critical', yellow(), If(Priority ='3 - Moderate', green(),If(Priority ='4 - Low', blue()))))

View solution in original post

Saravanan_Desingh
MVP
MVP

Try this expression, in the Calculated Color

Pick(Match(String,'Critical','High','Moderate','Low'),Red(),Yellow(),Green(),Blue())

commQV20.PNG

 

View solution in original post

4 Replies
Omkar13
Contributor III
Contributor III
Author

Solution:
 
=if(Priority = '2 - High', red(), If(Priority ='1 - Critical', yellow(), If(Priority ='3 - Moderate', green(),If(Priority ='4 - Low', blue()))))
Saravanan_Desingh
MVP
MVP

Try this expression, in the Calculated Color

Pick(Match(String,'Critical','High','Moderate','Low'),Red(),Yellow(),Green(),Blue())

commQV20.PNG

 

Omkar13
Contributor III
Contributor III
Author

Thanks @Saravanan_Desingh I will see if this expression also work with qlik sense. Appreciate it

Omkar13
Contributor III
Contributor III
Author

@Saravanan_Desingh It worked😁. Thanks, I have more ways to highlight text now. 😍