Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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.
Is there a way where I could do conditionnal formating when there is 2 measures for the column y-axis?
Thank you for your help.
@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.
Proud to be a Super User! |
|
Could you show where is the "data colours" section you mentionned? Can't seem to find it
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
64 | |
59 | |
56 |