Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to make colours in a bar chart indepenent of the selection of the list box

I have a stacked bar chart with the below expression.

count(DISTINCT{<DateType={'Created'},Ticket_Type=>}[TR #])+
count(DISTINCT{<DateType={'Created_IN'},Ticket_Type=>}[Incident Number])+
count(DISTINCT{<DateType={'Created_RTC'},Ticket_Type=>}Id)

This is independent of the list box selection Ticket_Type.

I have defined the below in the background colour in the chart

if(Priority = '1.High', RGB(255,0,0),

if(Priority = '2.Medium-High', RGB(255,128,64),

if(Priority = '3.Medium-Other',RGB(245,217,47),

if(Priority = '4.System / Job Failures', RGB(102,194,150),

if(Priority = '5.Low BPS', RGB(77,167,65))
)
)
)
)

But when I make a selection in the Ticket_Type in the listbox the colours change. Can anybody please help me how to make the script used in the background colours independent of the field Ticket_Type?

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

Hi Sanjyot,


Please try:

if(only({1}Priority) = '1.High', RGB(255,0,0),

if(only({1}Priority) = '2.Medium-High', RGB(255,128,64),

if(only({1}Priority) = '3.Medium-Other',RGB(245,217,47),

if(only({1}Priority) = '4.System / Job Failures', RGB(102,194,150),

if(only({1}Priority) = '5.Low BPS', RGB(77,167,65))
)
)
)
)

View solution in original post

3 Replies
miskin_m
Partner - Creator
Partner - Creator

Hi,

Can you upload sample qvw or else what is your other expression and whether the other expression also has backround color property.

adamdavi3s
Master
Master

Hi Sanjyot,


Please try:

if(only({1}Priority) = '1.High', RGB(255,0,0),

if(only({1}Priority) = '2.Medium-High', RGB(255,128,64),

if(only({1}Priority) = '3.Medium-Other',RGB(245,217,47),

if(only({1}Priority) = '4.System / Job Failures', RGB(102,194,150),

if(only({1}Priority) = '5.Low BPS', RGB(77,167,65))
)
)
)
)

Anonymous
Not applicable
Author

thanks..It worked