Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'd like to create a Bar Chart Visualization that is dynamic. I'd like the bar values to change color if the value is above a specific value.
I've done this in the past using the Analytics Tab and created a Constant Line. Here is an example of this. When the bar value are above .05% the bars turn Red, otherwise they remain Green.
However, I need to make this visualization more dynamic. I'd like the constant line value to be dependant on a slicer selection:
Essentially, when the user makes a selection in that slicer, I need the constant line to update according to the value associated with the group. For example:
Group Value
A .05%
B .07%
C .02%
I tried creating a table like the dummy data above and created realtionships but Constant Lines need to be manually set. I don't believe they can reference a Measure or Custom Column.
I also tried using a Bar and Line Chart visualization. While that allowed me to create a horizontal line that matches the Groups Value...I don't know how to make the color of the Bars dynamic....meaning have them change color if the bar is above the line value.
Does any of this make sense? I'm closely monitoring the thread so if you have any questions I will answer them quickly!
Thank you!
Andrew
Solved! Go to Solution.
@Anonymous , The constant line(under analytics pane) has the option of fx. You can choose a measure.
You can use the measure slicer approach to change measure for fx
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
Same way you can create a measure color and use that in conditional formatting using field value option
Color = Switch( True() ,
[Bar Meausre] > [selected measure], "Green",
"Red"
)
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
@Anonymous , The constant line(under analytics pane) has the option of fx. You can choose a measure.
You can use the measure slicer approach to change measure for fx
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
Same way you can create a measure color and use that in conditional formatting using field value option
Color = Switch( True() ,
[Bar Meausre] > [selected measure], "Green",
"Red"
)
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
Thank you so much for all the help over the past 2 years on this website.
Also, great youtube channel too. Thank you again!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |