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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
mladird
Frequent Visitor

Conditional color formating in a column chart with 2 measures

Hello,

 

I am trying to change the color of the columns in a Line & clustered column chart with a conditional formula.

It's working just fine when there is just 1 measure in the column y-axis. 

mladird_0-1737445737883.png

 

Is there a way where I could do conditionnal formating when there is 2 measures for the column y-axis?

mladird_1-1737445976884.png

 

Thank you for your help. 

 

 

 

3 REPLIES 3
Bibiano_Geraldo
Super User
Super User

Hi @mladird ,

Unfortunately, Power BI by default does not support conditional formatting for multiple value in column charts.

 

See related topic here

Please consider to vote this idea here

 

 

Is this post help you? Please consider to:

Accept as Solution!
Give a Kudo
Follow me on Linkedin

bhanu_gautam
Super User
Super User

@mladird You can try using


Expand the "Data colors" section.
You will see the measures listed under "Columns". Click on the fx button next to the measure you want to apply conditional formatting to.
In the "Default color" dialog that appears, choose "Field value" under "Format by".
Select the field that contains the conditional formatting logic. This field should return a color value based on your conditions.


If you have two measures, repeat the above steps for the second measure.
By setting up a field that returns color values based on your conditions, you can apply different colors to each measure in the chart. This approach allows you to handle multiple measures with conditional formatting in Power BI.

If you need to create a field that returns color values, you can use a DAX formula to define the logic. 

 

ColorMeasure =
SWITCH(
TRUE(),
[YourMeasure] > 500000, "Red",
[YourMeasure] > 100000, "Yellow",
"Green"
)
This DAX formula will return "Red" if the measure is greater than 500000, "Yellow" if it is greater than 100000, and "Green" otherwise. You can then use this field for conditional formatting.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Could you show where is the "data colours" section you mentionned? Can't seem to find it

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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