Forum Discussion
Marker custom colours
Hi there,
I want to add marker colour based on specific colour (RAG) in a line chart, has anyone got any suggestions? I have a filter for different geographies and using that in the legend currently. I am finding that this is a limitation and an alternative would be to use custom visual like DENEB? Any advice would be great
Hii Saul_Ring
Marker Colour = SWITCH ( SELECTEDVALUE ( 'Data'[RAG Status] ), "Better 95%", "#70AD47", "Similar", "#FFC000", "Worse 95%", "#C00000", "Not applicable", "#FFFFFF", "#808080" )Keep Geography in the Legend, then go to Format visual >> Markers >> Color >> fx, select Field value, and choose [Marker Colour]. Each marker will then be coloured according to its RAG status while the line series can remain grouped by geography.
2 Replies
- rohit1991
Super User
Hii Saul_Ring
Marker Colour = SWITCH ( SELECTEDVALUE ( 'Data'[RAG Status] ), "Better 95%", "#70AD47", "Similar", "#FFC000", "Worse 95%", "#C00000", "Not applicable", "#FFFFFF", "#808080" )Keep Geography in the Legend, then go to Format visual >> Markers >> Color >> fx, select Field value, and choose [Marker Colour]. Each marker will then be coloured according to its RAG status while the line series can remain grouped by geography.
- rajendraongole1
Super User
Hi Saul_Ring - If Geography is being used purely to drive a single-selection filter (one area shown at a time, like your screenshot suggests - "Selected area" vs "All areas"), you don't need it in Legend. Move it to Filters/slicer only. With Legend empty, the marker conditional formatting rule (based on your RAG field/measure) will become available again, and this gets you a native, no-custom-visual solution.
Note: Native Power BI marker conditional formatting only works when the visual has a single measure and no field in Legend. hope you got this.
Thank you