Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
robmarr789
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.

12 Replies
bc-thebruuu
Creator
Creator

Ok what about creating two columns in the script on wontaining Sales for current year and another for previous year?

robmarr789
Contributor
Contributor
Author

Unfortunately the sales will always come in in one column. i.e. a ledger

Can it not be done without using set analysis

bc-thebruuu
Creator
Creator

In the script you can use a preceding load:



LET CY=Num#(Year(Today()));

LOAD CustomerGroupName, Date,

if(Num#(Trim([Year]))=$(CY), Sales) as Sales_CY,if(Year=$(CY)-1,Sales) as Sales_PY;

LOAD * Inline [

CustomerGroupName, Date, Sales, Year

....


in this way you read a table with the following columns

CustomerGroupName, Date, Sales, Year

and you get in qlik a table with the following columns

CustomerGroupName, Date, Sales_CY, Sales_PY