Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can chart calculated colours be affected by dimensions?

I created a pie chart with one dimension and two expressions:

Dimension: A product group set

Expression1: Sum(sales)

>>>> So the size of each portion is the weight of each product group.

Expression2: Sum({$<Year={$(ThisYear)}>} Sales} / Sum({$<Year={$(LastYear)}>} Sales} - 1

>>>> So the expression shows a number next to the portion with the trend.

Now I want the colour of each portion to turn red or green according to the sign of its trend.

For what I've seen, the calculated base colour is not affected by the dimension.

So, is there any method to do that?

The final result should be similar to these pictures:

http://www.mactropolis.com/images/blog/bloomberg-iphone3.jpg

http://images.macworld.com/images/reviews/graphics/134571-drilldownb.jpg

Thank you for your time! [:)]

Josep

PD: What I've done for the moment is order the portion by product group (A->Z) so the order will always be the same, and then adapt each colour filtering for each product group value.

1 Solution

Accepted Solutions
fernandotoledo
Partner - Specialist
Partner - Specialist

You can set this at the first expression´s (+) sign, Background color option.

The expression will be something like

if(EXPRESSION2<0,red(),green())


View solution in original post

3 Replies
fernandotoledo
Partner - Specialist
Partner - Specialist

You can set this at the first expression´s (+) sign, Background color option.

The expression will be something like

if(EXPRESSION2<0,red(),green())


fernandotoledo
Partner - Specialist
Partner - Specialist

See?

Not applicable
Author

Surprise

Now it seems so simple...

Thank you Fernando!