Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Background colour on button

Hi, QlikView Community

I am a simple dataset what you can look at in the excel file.

I have one trouble I am trying to solve regarding background color in button.

I have a button that has actions that is supposed to select two Company Codes (100 and 110).

Also I want the button to change colors when I push the button.

I want the button to change when the Company Codes are 100 and 110 and I want the button to change back when I deselect the company codes.

I tried this formula in the button calculated base color:

=If([Company Code] = '100' and [Company Code] = '110', RGB(0, 240, 16), RGB(15, 48, 99))

but it did not work. Do you have any ideas?

regards Darri

11 Replies
sathishkumar_go
Partner - Specialist
Partner - Specialist

Try this

=if(wildmatch((GetFieldSelections([Company Code])),'100','110','(100|110)','100, 110'),RGB(0, 240, 16), RGB(15, 48, 99)) 

-Sathish

PradeepReddy
Specialist II
Specialist II

try like this..

=if(Concat(distinct [Company Code],',')='2008,2009',RGB(0, 240, 16), RGB(15, 48, 99))