Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
You can set this at the first expression´s (+) sign, Background color option.
The expression will be something like
if(EXPRESSION2<0,red(),green())
You can set this at the first expression´s (+) sign, Background color option.
The expression will be something like
if(EXPRESSION2<0,red(),green())
Now it seems so simple...
Thank you Fernando!