Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mahitham
Creator II
Creator II

Bar chart color coding help

Hi Experts,

Can any one please help me on below requirement .

I have applied below color expression in the bar chart for all current year high, low and medium need to show Red, black and grey.

for all previous year high, low and medium need to show orange, yellow and green.

=if(Category='Low' and Year=$(=Max(Year)),RGB(0,0,0),

if(Category='Low' and Year=$(=Max(Year)-1),RGB(255,255,102),

if(Category='High' and Year=$(=Max(Year)),RGB(255,0,0),

if(Category='High' and Year=$(=Max(Year)-1),RGB(255,204,153),

if(Category='Medium' and Year=$(=Max(Year)),RGB(128,128,128),

if(Category='Medium' and Year=$(=Max(Year)-1),RGB(153,255,153)))))))

But when I have selected 2017 then previous year 2016 color coding not working. Please help me on this.

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

Try this as your expression for color

=Only({1}if(Category='Low' and Year=$(=Max(Year)),RGB(0,0,0),

if(Category='Low' and Year=$(=Max(Year)-1),RGB(255,255,102),

if(Category='High' and Year=$(=Max(Year)),RGB(255,0,0),

if(Category='High' and Year=$(=Max(Year)-1),RGB(255,204,153),

if(Category='Medium' and Year=$(=Max(Year)),RGB(128,128,128),

if(Category='Medium' and Year=$(=Max(Year)-1),RGB(153,255,153))))))))

Capture.PNG

View solution in original post

1 Reply
sunny_talwar

Try this as your expression for color

=Only({1}if(Category='Low' and Year=$(=Max(Year)),RGB(0,0,0),

if(Category='Low' and Year=$(=Max(Year)-1),RGB(255,255,102),

if(Category='High' and Year=$(=Max(Year)),RGB(255,0,0),

if(Category='High' and Year=$(=Max(Year)-1),RGB(255,204,153),

if(Category='Medium' and Year=$(=Max(Year)),RGB(128,128,128),

if(Category='Medium' and Year=$(=Max(Year)-1),RGB(153,255,153))))))))

Capture.PNG