Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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)))
It seems to work fine here. Can you post a document that demonstrates the problem?
Try checking 'Persistent Colors' in the 'Colors' tab of your chart properties.
In color tab->check the persistenct color
Persistent colors should not have any effect if you are using a color expression.
Johan is correct
Persistent colors has no effect if you are using a color expression.
Persistent colors has no effect if you are using a color expression.
OOPS I forgot that Thanks for comment
Try using
pick(match(market,'EMEA','APAC') , red() , rgb(215.215.166))
This is what I know the best expression for dynamic coloring.
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*')