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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change text color base on data?

Hi all, I try to set text color.

I want the node that start with "TTL___" and "STTL" have blue color. And I set the text color with this code

: if((mid(FICO_NodeGroup,1,3)='TTL') or (FICO_NodeGroup='STTL'),RGB(0,0,204),black())

But some data is not change color. I'm not sure, it's will concern with the value of another dimension that has value = 0.

error loading image

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3010.textcolor.zip:550:0]

Could someone help me or suggest any better way to handle these issues?

Thank you.

6 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd say - you are doing everything right. From what I can see, the color is not propagated in the "FICO_NODEGROUP" column( because the attribute is not defined there) and in the last set of columns, where your Period is NULL. So, if you copy your Text Color formula into the color attribute of the "FICO_NODEGROUP" dimension, and suppress nulls (which I think you need to do anyway), everything will be fine.

Ask me about Qlik Sense Expert Class!
Not applicable
Author

Hi Oleg, I already try to change my project follow your suggestion. It's suppress null data.

But some row still has a problem. If you can see from my QVW or picture( in row number 50), the text in Catalogue column is not change color. But in the same row, some data already change to blue color.

Furthermore can I shows all data by not suppress null value?

Do we have the way to handle its?

Not applicable
Author

Hi all, now I try to change expression in text color to support my design.

I use this code :

if((mid(FICO_NodeGroup,1,3)='TTL') or (FICO_NodeGroup='STTL') ,RGB(0,0,204),
if((if((mid(FICO_NodeGroup,1,3)='TTL') or (FICO_NodeGroup='STTL'),RGB(0,0,204),black()=black()and if((Amt.=0),1,0)=1)) ,RGB(0,0,204),black()))

It's nearly the design what I want. The text that start with 'TTL___' and 'STTL' changed to blue color. But the others texts that has null value change the color too.

Can someone suggest me, please?

Thank you.

Not applicable
Author

I still stuck with this problem, Could anyone tell me the solution to solve this problem? Angel

Not applicable
Author

Hi,

Any one have work around on this ? Pls help me.

Regards

Not applicable
Author

Is the problem come from the null value. Can we set text color when data has null value?

I found that the RGB color not work on null value, right???

If the problem from the RGB color, Can I set text color by use anothe function?