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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sdegroot
Helper I
Helper I

Color coding based on changing baseline and target

Hello, 

 

I'm trying to create a line and cluster column chart that changes colour when the baseline and the target are met. One colour below the baseline, one colour above the baseline and one colour above target.  Each field that is chosen corresponds with a different baseline and target. It looks like color saturation is not available in this type of visualization and even if it was, it looks like I have to choose a specific value that reflects the baseline and target but each field's target and baseline is different. I'm thinking this is not possible...?

 

Here's what I have so far. Idealy Q1 should be red, Q2 and Q4 should be yellow, and, pretending Q3 reached the target, it would be green.

 

 Capture.PNG

Thank you!

4 REPLIES 4
v-qiuyu-msft
Community Support
Community Support

Hi @sdegroot,

 

You can try to create a calculated column to return result whether the actual value meet the baseline or target. Then use this new column in the Column Series property.

 

ColorCondition = SWITCH(TRUE(),'Table2'[Actual]<'Table2'[Baseline],"Red",'Table2'[Actual]>='Table2'[Baseline] && 'Table2'[Actual]<'Table2'[Target],"Yellow",'Table2'[Actual]>='Table2'[Target],"Green")

 

q7.PNG

 

Best Regards,
QQiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you, that was very useful!

 

It looks like I cannot use this same method when creating a table. The table should follow the same code as below but, from my understanding of previous posts, conditional formating is not available from a value in a table unless it is an aggregated value. Is this true?

prathy
Advocate III
Advocate III

Hi,

Kind of conditional formatting you are after; I don't think it is available out of the box. But, if you want you could probably add some custom columns and add overlays of charts to get something like below. NB: Works better only when you don’t want visuals to interact with other visuals on the report I don’t think, my idea is a best practice but a work around 🙂
Capture.PNG

If you wnat I will share my PBIX file, let me know!

HTH!

Prathy

Hello Prathy,

Thanks for you response. I think we're looking for something a little more asthetically appealing so I've used the option of just using a column chart and using Diverging Data Colors. Unfortunately, because I have to state a minimmum and a maximum # it does not work well with the different fields as each field has a different baseline and target :(. Basically, here's what's happening now.

 

I properly set up one field indicator:

Capture.PNG

 

 

But the next one will look like this since the the color coding is not based on a field:

Capture.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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