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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Irwin
Helper IV
Helper IV

Fields parameters - Color your data

Hi guys,

 

I have several graphs (scatter plots) that I would like to combine to one by using the fields parameter. No problem. Done.

But when I want to apply the previous color coding I run into problems. How do I do this for multiple values sharing the y-axis?

 

My setup is date on x-axis, different values on y-axis (temperature/fat/protein/etc). If the value is below/above a certain limit it is green, if it is outside this then red.

Green/red is different from parameter to parameter.

 

Thank you for all help 🙂

2 REPLIES 2
amitchandak
Super User
Super User

@Irwin , You can know what is selected like

What is selected = maxx(filter('Axis Slicer', 'Axis Slicer'[Axis Slicer Order]= SELECTEDVALUE('Axis Slicer'[Axis Slicer Order])),'Axis Slicer'[Axis Slicer])

 

Based on this you can create a measure that return color based on measure used

 

simple example

 

color Measure =
Switch(True() ,
max(Table[ID]) in {10,20,30} ,"Red",
max(Table[ID]) in {5,15,25} ,"Blue",
"White"
)

 

Measure =
Switch(true(),
max(Table[Column]) = "R1" , "Red" ,
max(Table[Column]) = "R2" , "Green" ,
max(Table[Column]) = "R3" , "Pink "
)

 

You can use the same in conditional formatting using field value option

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

This seems like what i want. Could you elaborate more on the last two measures. I cannot get them to work and I am also unsure where I should place them?

"What is selected" - In the slicer ?
"Color measure" and "measure" - in the field value? How do they work? 🙂

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.