Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to identify that field have multiple values selected

I've a field named Day;

And I've 5 buttons with an action "Alter Selection"

I have 5 buttons:

  • Monday
    • Alter Selection -> W_Day = ‘M’
  • Thursday
    • Alter Selection -> W_Day = ‘T’
  • Wednesday
    • Alter Selection -> W_Day = ‘W’
  • Tuesday
    • Alter Selection -> W_Day = ‘Tu’
  • Friday
    • Alter Selection -> W_Day = ‘F’

I want now that my buttons change it colour based on selection. For example, for the first button I'm trying:

=IF(MATCH(Day,'M') ,RGB(0,0, 0), RGB(255, 255, 255))

If I only have the value 'M' selected, it works fine but I select other values it changes... I already try with Day = ('M' | 'T') but it do what I want...

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=If(SubStringCount(Concat(DISTINCT '|' & Day & '|'),'|M|') = 1, RGB(0,0, 0), RGB(255, 255, 255))

View solution in original post

3 Replies
Chanty4u
MVP
MVP

did u try

=IF(MATCH(Day,'M','T','W','Tu','F') ,RGB(0,0, 0), RGB(255, 255, 255))

sunny_talwar

Try this:

=If(SubStringCount(Concat(DISTINCT '|' & Day & '|'),'|M|') = 1, RGB(0,0, 0), RGB(255, 255, 255))

Gysbert_Wassenaar

Try =if(max(match(Day, 'M')), RGB(0,0, 0), RGB(255, 255, 255))


talk is cheap, supply exceeds demand