Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
pitucc
Helper I
Helper I

Scatter plot different color shade

Hi,

To make it simple, i have three variables X, Y, Z

I have set up a scatter plot which  represent X on axe X, Y on axe Y and Z as a dotes (as Legend). Z are dates. As you can see, each  dates has a different color. I would like to know if i can easely set something like : most recent 10 dotes in Bleu, all the other one in Red. Or even better most recent 10 dotes in Brigh Red, between 10 an 50 : lighter red, 50 to 100, lighter lighter red 100 to 200 in black, in order to visualise how my data has evolved with the time passing.

Thanks in advance for your help

Cheers

Pierre

 

 

 

scatter.PNG

 

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @pitucc,

You can create a rank calculated column based on Z, then create another column similar the formula.

 

color = IF(Table[Rank]<=10,"Red",IF(Table7[Rank]<=50,"lighter red",IF(Table[Rank]<=100,"lighter lighter red","black")))


Then add the Z field as Detail level, the color as Lengend, then adjust the Lengend color using the hammer button.

 

 

I try to reproduce using my sample table, please review.

1. Create calculated column using the formulas.

Rank = RANKX(Table7,Table7[Z],,DESC,Dense)
color = IF(Table7[Rank]<=2,"Red",IF(Table7[Rank]<=5,"Green","yellow"))


You will get the results as follows.

1.PNG

2. Create a scatter chart. Click the hammer buttom, and select the expected color.

3.png

You will get expected result as follows, please note the X,Y,Z,color fields.

2.PNG

Best Regards,
Angelia

 

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @pitucc,

You can create a rank calculated column based on Z, then create another column similar the formula.

 

color = IF(Table[Rank]<=10,"Red",IF(Table7[Rank]<=50,"lighter red",IF(Table[Rank]<=100,"lighter lighter red","black")))


Then add the Z field as Detail level, the color as Lengend, then adjust the Lengend color using the hammer button.

 

 

I try to reproduce using my sample table, please review.

1. Create calculated column using the formulas.

Rank = RANKX(Table7,Table7[Z],,DESC,Dense)
color = IF(Table7[Rank]<=2,"Red",IF(Table7[Rank]<=5,"Green","yellow"))


You will get the results as follows.

1.PNG

2. Create a scatter chart. Click the hammer buttom, and select the expected color.

3.png

You will get expected result as follows, please note the X,Y,Z,color fields.

2.PNG

Best Regards,
Angelia

 

Your solution is properly perfect

Many thanks

Pierre

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.