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

Need Help

Hi Community,

I have 3 buttons and one straight table..

I have 3 fields in my straight table..

ID, Name and salary...

I have given background color for sum(sal)

like this expression

=if(sum(sal)<5000, red(),

  if(sum(sal)<=15000,Yellow(),

  if(sum(sal)<=25000,Green(),RGB(0,190,345))))

Capture.PNG

Suppose, I have 3 buttons Test1, Test2 and Test3

If i am  click Test1 button i want apply to this color background to chart

=if(sum(sal)<5000, red(),

      if(sum(sal)<=15000,Yellow(),

            if(sum(sal)<=25000,Green(),RGB(0,190,345))))

If i am click Test2 button

=if(sum(sal)<5000, Green(),

      if(sum(sal)<=15000,Black(),

            if(sum(sal)<=25000,Yellow(),RGB(100,134,210))))

Test3 Button,

=if(sum(sal)<5000, Yellow(),

      if(sum(sal)<=15000,red(),

            if(sum(sal)<=25000,Green(),RGB(225,255,255))))

Depends on button selection i want change straight table background color for sum(sal)....

Thanks in Advance..

1 Solution

Accepted Solutions
sunny_talwar

I guess create one variable which is set to a different numbe by the three buttons. and then use this may be:

Pick(Match(vVar, 1, 2, 3),

if(sum(sal)<5000, red(),

      if(sum(sal)<=15000,Yellow(),

            if(sum(sal)<=25000,Green(),RGB(0,190,345)))),

if(sum(sal)<5000, Green(),

      if(sum(sal)<=15000,Black(),

            if(sum(sal)<=25000,Yellow(),RGB(100,134,210)))),

if(sum(sal)<5000, Yellow(),

      if(sum(sal)<=15000,red(),

            if(sum(sal)<=25000,Green(),RGB(225,255,255)))))

View solution in original post

3 Replies
simenkg
Specialist
Specialist

Create 3 variables that contain the color codes.

for each button use Action - External - Set Variable to change the values of the 3 variables.

sunny_talwar

I guess create one variable which is set to a different numbe by the three buttons. and then use this may be:

Pick(Match(vVar, 1, 2, 3),

if(sum(sal)<5000, red(),

      if(sum(sal)<=15000,Yellow(),

            if(sum(sal)<=25000,Green(),RGB(0,190,345)))),

if(sum(sal)<5000, Green(),

      if(sum(sal)<=15000,Black(),

            if(sum(sal)<=25000,Yellow(),RGB(100,134,210)))),

if(sum(sal)<5000, Yellow(),

      if(sum(sal)<=15000,red(),

            if(sum(sal)<=25000,Green(),RGB(225,255,255)))))

qlikmsg4u
Specialist
Specialist

Check the attached application.