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.
I have a clustered bar chart and I'd like to set a min and max value that formats the bars a different color. The min and max threshold is different depending on slicer values. I have a Measure that calculates the min/max but can't figure out how to say "less than min measure" and "greater than max" measure in the conditional formatting screen.
I'm guessing it's not possible but thought I'd ask. Thanks!
Solved! Go to Solution.
@Anonymous , Conditional formatting has few limitations. On a few visual, it not supported with legends and second measure.
You can use color scale , rule or field value.
For "Field value" create a measure like
Color Measure =
var _min = CALCULATE([Min Measure],ALL(Table))
var _max = CALCULATE([Max Measure],ALL(Table))
return switch(TRUE(),
[Percent %] <_Min , "Red",
[Percent %] >_max , "Green", "Blue")
Refer for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
@Anonymous , Conditional formatting has few limitations. On a few visual, it not supported with legends and second measure.
You can use color scale , rule or field value.
For "Field value" create a measure like
Color Measure =
var _min = CALCULATE([Min Measure],ALL(Table))
var _max = CALCULATE([Max Measure],ALL(Table))
return switch(TRUE(),
[Percent %] <_Min , "Red",
[Percent %] >_max , "Green", "Blue")
Refer for steps
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
@Anonymous Yes, you can use measures in conditional formatting. I believe it is Rules based that you want. Or you can use Field value in Format By
@Anonymous Sorry, where is the "Enter a value" section? Can you post a screen shot and point to where you mean? You are really better off doing all the logic in your measure as kind of color flag that returns like 1, 2, 3 based on the conditions you set.
@Greg_DecklerIn the screenshot you posted. Under the Minimum and Maximum sections. The grey boxes where you enter the min and max values.
@Anonymous Nope, can't do that there. That's why I suggested doing the logic in your measure itself to essentially create a flag.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |