Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

Background Color formatting in Expression

Hi Community.

I have the below expression where I would like to format all cells which have a concatenated result the desired RGB color. I have several different combinations and I cannot create a separate expression for each one and wanted to see if I could use the Wild Match feature instead. Please see attached sample workbook.

If(Concat(DISTINCT Item,',')=(WildMatch(Item,'*o*','*o*')='-1'),RGB(146,208,80),

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

Hi,

your color expression test:

If(Concat(DISTINCT Item,',')=(WildMatch(Item,'*o*','*o*')='-1'),RGB(146,208,80),


can be replaced by this:


=WildMatch(Concat(DISTINCT Item,','),'*o*'),RGB(146,208,80),


Keep in mind that with concat, before making selections on Item filter, the result will always be true

View solution in original post

4 Replies
YoussefBelloum
Champion
Champion

Hi,

your color expression test:

If(Concat(DISTINCT Item,',')=(WildMatch(Item,'*o*','*o*')='-1'),RGB(146,208,80),


can be replaced by this:


=WildMatch(Concat(DISTINCT Item,','),'*o*'),RGB(146,208,80),


Keep in mind that with concat, before making selections on Item filter, the result will always be true

YoussefBelloum
Champion
Champion

But it is better to take a screen shot and show us what is wrong and what is the expected output (colors)

ZoeM
Specialist
Specialist
Author

Hi Youssef.

Thanks for looking into this. I added 'If" to the statement you provided so that it could work within the NestedIf statement I had in the formula and it worked.

But I'm thinking that this formula works if 'o' is a common field in both sides of the concatenation? What if it not a common field in both sides.So like in the example of Balloons,Fruit, and Helium,Cans and I want to color format them the same and there is no common field among them.

YoussefBelloum
Champion
Champion

Are you asking another question ?

With the above you're searching the O character inside all the possible concatenated Item values.