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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dynamic Conditional Colouring in Scatter Plots

Hi! I am trying to built a dashboard for client presentations and have built the below chart where you have one dot for each client. When speaking to a client we are not allowed to show by name where the other clients lie in the chart but would like to show them where they lie compared to their peers in order to benchmark themselves. Therefore, I would like to every time colour the client we present to with say red and all the others with the same colour say black. We have multiple charts like that so we cannot change the legend colours manually every time. Is there an easy way to do conditional colouring in scatter plots?

 

nefeli_ef_0-1603990963190.png

 

Thank you very much, really appreciate any help on this!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @nefeli_ef

You can use conditional formatting in the scatter plot.

I build a sample table for testing.

My table:

1.png

Then I build a client table. Create a slicer next to this table.

Client = values('Table'[Client])

My measure:

Color = 
VAR _Sel = SELECTEDVALUE(Client[Client])
Return
IF(MAX('Table'[Client])=_Sel,1,0)

Add this measure to the data color in Format.

2.png

The result is as follows. By default, all points will be black, when we select a customer in the slicer, the selected customer point will be red and others in black.

3.png

You can download the pbix file from this link: Dynamic Conditional Colouring in Scatter Plots

Best regards

Rico Zhou

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hello @nefeli_ef

You can use conditional formatting in the scatter plot.

I build a sample table for testing.

My table:

1.png

Then I build a client table. Create a slicer next to this table.

Client = values('Table'[Client])

My measure:

Color = 
VAR _Sel = SELECTEDVALUE(Client[Client])
Return
IF(MAX('Table'[Client])=_Sel,1,0)

Add this measure to the data color in Format.

2.png

The result is as follows. By default, all points will be black, when we select a customer in the slicer, the selected customer point will be red and others in black.

3.png

You can download the pbix file from this link: Dynamic Conditional Colouring in Scatter Plots

Best regards

Rico Zhou

If this post helps,then consider Accepting it as the solution to help other members find it faster.

Anonymous
Not applicable

Thank you so much @Anonymous!! This works now! 

amitchandak
Super User
Super User

@Anonymous , make sure you have an independent client table to color the dot. and Client is not use as legent

 

Measure =

var _cli = maxx(allselected(Indclient),Indclient[Name])

return

if(max(clinet[client]) =_cli , "Red","Green")

 

Use this in conditional formatting with field value options.

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

Also  refer: https://youtu.be/Q1vPWmfI25o

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you for the response. I have created a table with the Client Names and tried this but I can't get it to work. Can you please have a look at my formula? I get an error saying "Too few arguments were passed to the MAXX function. The minimum argument count for the function is 2." I only have one column I will be filtering in which is the Client List. 

 

I adapted your formula to my table where:

Unique Clients: Table of Client List

Client Aliaslast: Column with Client Names

 

 
Measure = var _cli = maxx(allselected('Unique Clients', 'Unique Clients'[Client Aliaslast]))
return
if(max('Unique Clients'[Client Aliaslast[Ben]) =_cli , "Red","Green")

 

Can you please tell me what is wrong?

 

Thank you!

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.

Top Solution Authors