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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Ian_Altis
Advocate III
Advocate III

Conditionally format text in legend

I want the text of the element to be the same as the marker in the legend so that"Africa" on the below scatterplot would be blue.  Now there is conditional formatting available for this but I cannot get it to work.  I have created a measure as shown below which I am using to set the colour.  This measure works for every other element that I have conditionally formatted.

Screenshot 2023-11-01 141620.png

Screenshot 2023-11-01 142256.png

Region Colour =
VAR SelectedRegion = SELECTEDVALUE(Dim_Country[Region Name])
VAR RegionColour = SWITCH(SelectedRegion,
                        "Africa", "#25CBD3",
                        "Americas","#A66999",
                        "Asia","#EE3A6B",
                        "Europe","#959DA2",
                        "Oceania","#FF9E00"
                    )
RETURN
RegionColour
 
Any ideas?
1 REPLY 1
lbendlin
Super User
Super User

Not only can you only have a single color for the entire legend

lbendlin_0-1699105982208.png

to add insult to injury you cannot even color your bubbles dynamically.

lbendlin_1-1699106063391.png

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors