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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

changing the text color using IF & match

Hi,

the following code is not working, what can I do to get it to work?

=if(match([Tree Name],[Tree Name Group]), RGB (128,0,0),RGB(0,0,0))

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi,

try

If(Match([Tree Name] , $(=Concat(DISTINCT Chr(39)&[Tree Name Group]&Chr(39),','))), RGB (128,0,0),RGB(0,0,0))

Owever this works if [Tree Name] -> 1 Value

Regrds,

Antonio

View solution in original post

17 Replies
sinanozdemir
Specialist III
Specialist III

Try it like the below:

=if(match([Tree Name],chr(39) & [Tree Name Group] & chr(39)), RGB (128,0,0),RGB(0,0,0))


Hope this helps

Anonymous
Not applicable
Author

thanks for the reply but it is not working

krishnacbe
Partner - Specialist III
Partner - Specialist III

Share some sample data or app. so that we can help you better

krishnacbe
Partner - Specialist III
Partner - Specialist III

If there are more that one possible values for [Tree Name Group], then your expression will not work.

Anonymous
Not applicable
Author

yes,there are more that one possible values for [Tree Name Group. So, what should I do instead?

Mark_Little
Luminary
Luminary

Hi,

Not sure where you are doing this, but if i was writing it would just do it like

If([Tree Name] = [Tree Name Group], RGB (128,0,0),RGB(0,0,0))

Mark

Anonymous
Not applicable
Author

Hi Mark,

thanks for your help. this is where I am doing this:

teaxt.GIF

antoniotiman
Master III
Master III

Hi,

try

If(Match([Tree Name] , $(=Concat(DISTINCT Chr(39)&[Tree Name Group]&Chr(39),','))), RGB (128,0,0),RGB(0,0,0))

Owever this works if [Tree Name] -> 1 Value

Regrds,

Antonio

Anonymous
Not applicable
Author

It is still not working