Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Ensure colours do not change in bar chart

I have an expression which defines the background colour for a bar chart I have

if(wildmatch(Market, 'EMEA*'), RGB(141,170,203),if(wildmatch(Market, 'APAC*'), RGB(252,115,98),RGB(187,216,84)))

It works well, until i start making selections in the Market field whereby the can bars change colour. Obviously I don't want that to happen, i want to colours defined above to stay fixed for each bar.

How do i do this?

1 Solution

Accepted Solutions
Highlighted

Hi Alex, It's strange, if you salect a maket the bars it other markests should disappear and keep those in the selected market with the colors you set.

I guess your dimension is showing values that can be in mero than one market or you an using an expression with set analysis, in both cases, a selection will change the 'market' vaues for some dimension values and that causes to change the bar colors.

Try using something like:

if(wildmatch(Only({<Market>} Market), 'EMEA*'), RGB(141,170,203),if(wildmatch(Only({<Market>} Market), 'APAC*'), RGB(252,115,98),RGB(187,216,84)))

View solution in original post

11 Replies
Highlighted
MVP & Luminary
MVP & Luminary

It seems to work fine here. Can you post a document that demonstrates the problem?


talk is cheap, supply exceeds demand
Highlighted
Creator II
Creator II

Try checking 'Persistent Colors' in the 'Colors' tab of your chart properties.

Highlighted
Specialist II
Specialist II

In color tab->check the persistenct color

Highlighted
Employee
Employee

Persistent colors should not have any effect if you are using a color expression.

Highlighted
Not applicable

Johan is correct

Persistent colors has no effect if you are using a color expression.

Highlighted
Not applicable

Persistent colors has no effect if you are using a color expression.

Highlighted
Specialist II
Specialist II

OOPS I forgot that Thanks for comment

Highlighted
Not applicable

Try using

pick(match(market,'EMEA','APAC') , red() , rgb(215.215.166))

This is what I know the best expression for dynamic coloring.

Highlighted
Partner
Partner

If I understand you correctly you're displaying a chart/table with results regardless of a selection in Market, however your color expression is not. If you want the color expression to have the same result regardless of a selection in market you need something like:

WildMatch(Concat({<Market=>} DISTINCT Market),'EMEA*')