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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
azaterol
Helper V
Helper V

Change the color of the bubble automatically according to representative

Hello everyone,

 

I have a map as a visualization.

azaterol_0-1712126714126.png

 

Under location I used the customer's location. I have entered the customers under the legend (customer name).

azaterol_2-1712126930228.png


This is linked to the representative in the report.

azaterol_1-1712126829442.png

In other words, I have a preselection of 3 representatives. If I select John, only John and his customers will be shown on the map. How can I use a function to ensure that each of John's customers automatically receives the color red when assigned to him?

 

I have previously set the color of the bubbles manually, but I would like to change this to automatically in the future.

 

I would be grateful for your answers.

 

1 ACCEPTED SOLUTION
Joe_Barry
Super User
Super User

Hi @azaterol 

 

You can create a measure. Presuming you have the Sales Rep in the Customer Dimension Table, create this measure

 

SalesRepColour = 
SWITCH(SELECTEDVALUE('DIM Customer'[SalesRep]),
"John", "#FF0000",
"Tom", "#7ACA00")

 

Go to the Formatting Pane of the Visual > Bubbles > Colors > fx Format Sytle = Field Value Then choose the measure you created for the What field should we base this on

 

Hope this helps

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


View solution in original post

2 REPLIES 2
Joe_Barry
Super User
Super User

Hi @azaterol 

 

You can create a measure. Presuming you have the Sales Rep in the Customer Dimension Table, create this measure

 

SalesRepColour = 
SWITCH(SELECTEDVALUE('DIM Customer'[SalesRep]),
"John", "#FF0000",
"Tom", "#7ACA00")

 

Go to the Formatting Pane of the Visual > Bubbles > Colors > fx Format Sytle = Field Value Then choose the measure you created for the What field should we base this on

 

Hope this helps

Joe

 

If you found my answer helpful and it solved your issue, please accept as solution




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Learn about the Star Schema, it will solve many issues in Power BI!

Date tables help! Learn more



LinkedIn
Let's connect on LinkedIn


Thank you. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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