3 Replies Latest reply: May 17, 2018 12:26 PM by Robert Marr

# Colour scatter points relative to scatter points

Can any one show me how to colour the scatter points on this chart based on the following rules

1. If points are in top right quadrant then colour Green

2. If points are in bottom right then colour Red

3. If points are in bottom left then colour Orange

4. If points are in top left then colour blue

Bare in mind the reference lines are set relative to a percentile so will move as and when new data is added.

Ideally if someone could provide the completed solution and reattach the file so I can see how you've done it it would be much appreciated.

• ###### Re: Colour scatter points relative to scatter points

Hi Sunny,

I can see why you may think that but think time I have a slightly different problem. In the previous example the variance figures were stored in a separate column. In this example the variance is the result of an expression. I can't figure how to adjust your solution to my new scenario.

If you have a look at the script you will see how the data is stored this time

Any ideas?

• ###### Re: Colour scatter points relative to scatter points

try this

=If(Sum(IF(Year = Year(Today()), Sales)) >= Fractile(TOTAL Aggr(Sum(IF(Year = Year(Today()), Sales)), CustomerGroupName), 0.5),

If(Sum(IF(Year = Year(Today()),Sales,))-Sum(IF(Year = Year(Today())-1,Sales)) > Fractile(TOTAL Aggr(Sum(IF(Year = Year(Today()),Sales,))-Sum(IF(Year = Year(Today())-1,Sales)), CustomerGroupName), 0.5), LightGreen(), LightRed()),

If(Sum(IF(Year = Year(Today()),Sales,))-Sum(IF(Year = Year(Today())-1,Sales)) > Fractile(TOTAL Aggr(Sum(IF(Year = Year(Today()),Sales,))-Sum(IF(Year = Year(Today())-1,Sales)), CustomerGroupName), 0.5), LightBlue(), LightMagenta()))

• ###### Re: Colour scatter points relative to scatter points

Fantastic, worked perfectly