Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

colour scatter points relative to reference lines?

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 points are set relative to the percentile so will move as and when new data is added.

1 Solution

Accepted Solutions
Highlighted

Re: colour scatter points relative to reference lines?

Try this color expression

=If(Sum(sales) >= Fractile(TOTAL Aggr(Sum(sales), CustomerGroupName), 0.5),

If(Sum(variance) > Fractile(TOTAL Aggr(Sum(variance), CustomerGroupName), 0.5), LightGreen(), LightRed()),

If(Sum(variance) > Fractile(TOTAL Aggr(Sum(variance), CustomerGroupName), 0.5), LightBlue(), LightMagenta()))

Used Light Magenta for Orange, but feel free to change all the colors based on your requirement

Capture.PNG

View solution in original post

4 Replies
Highlighted

Re: colour scatter points relative to reference lines?

Try this color expression

=If(Sum(sales) >= Fractile(TOTAL Aggr(Sum(sales), CustomerGroupName), 0.5),

If(Sum(variance) > Fractile(TOTAL Aggr(Sum(variance), CustomerGroupName), 0.5), LightGreen(), LightRed()),

If(Sum(variance) > Fractile(TOTAL Aggr(Sum(variance), CustomerGroupName), 0.5), LightBlue(), LightMagenta()))

Used Light Magenta for Orange, but feel free to change all the colors based on your requirement

Capture.PNG

View solution in original post

Highlighted
Creator
Creator

Re: colour scatter points relative to reference lines?

Hi,
Here's a simple reply with hard coded values
The color property is set in the following screen:
sample_sales.png
In order to use calculated values add another expression with percentile calculate and put this expression name in the IF
Highlighted
Contributor
Contributor

Re: colour scatter points relative to reference lines?

Would you mind showing me the expression for percentile calculate?

Highlighted
Creator
Creator

Re: colour scatter points relative to reference lines?

Hi Robert,

Sunny formula looks ok.

In order to calculate percentile you need to use the Fractile(X,0.5) formula.

But if need be I cna provide the formula, let me know