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: 
shanky1907
Creator II
Creator II

Bar chart background color

Hello All,

I have a problem with my Bar chart like:

1) I have a Dimension as 'Category'.

2)In the expression, i have given specific colors(in the background color of the expression) to every bar according to value of the Dimension as:

=Pick(Match(Category,'Your Company','Your Customers','Your Processes','Your Responsibilities','Your Role','Overseer'),rgb(241,115,115),rgb(98,176,255),rgb(255,140,55),rgb(0,101,149),rgb(11,147,116),rgb(126,138,146))

3)It works perfectly fine wheni select any month which has data for it. But when there is not data in the moneht selected then all bars show single default color.

I want to keep the color as it required if there is no data also.

*NOTE: In my expression i am calculating rolling YTD data.

1 Solution

Accepted Solutions
prat1507
Specialist
Specialist

Use this

=Pick(Match(Only({1}Category),'Your Company','Your Customers','Your Processes','Your Responsibilities','Your Role','Overseer'),rgb(241,115,115),rgb(98,176,255),rgb(255,140,55),rgb(0,101,149),rgb(11,147,116),rgb(126,138,146))

View solution in original post

4 Replies
prat1507
Specialist
Specialist

Use this

=Pick(Match(Only({1}Category),'Your Company','Your Customers','Your Processes','Your Responsibilities','Your Role','Overseer'),rgb(241,115,115),rgb(98,176,255),rgb(255,140,55),rgb(0,101,149),rgb(11,147,116),rgb(126,138,146))

sunny_talwar

Try this

=Pick(Match(Only({1} Category), 'Your Company', 'Your Customers', 'Your Processes', 'Your Responsibilities', 'Your Role', 'Overseer'), RGB(241,115,115), RGB(98,176,255), RGB(255,140,55), RGB(0,101,149), RGB(11,147,116), RGB(126,138,146))

shanky1907
Creator II
Creator II
Author

Excellent!! Thanks..

shanky1907
Creator II
Creator II
Author

Thank Sunny for the quick response.