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.
Hello everyone!
I have a simple bar chart with a line.
the bar shows me the actual sales per day and the line shows me the budget.
is there any chance to get a red bar if the sales were for the corresponding day below the line/ budget?
Best Regards
@joshua1990 , Create a measure which returns, diff between Atual and Budget , And use that for rule-based conditional formatting
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting
https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692
Thanks, for your reply!
Please, read my post carefully. I am not looking for conditional formatting in a table.
I am looking for changing the color of bars in a bar chart...
Hey @joshua1990 ,
this measure returns the name of a color that should be applied to a bar if a certain condition is met:
fill Color =
IF(DIVIDE([Total Sales Amount (PY)] , [Total Sales Amount]) >= 1.2 , "red" , BLANK())
This article lists the colors that are supported: https://blog.crossjoin.co.uk/2018/08/10/colour-names-supported-in-power-bi-conditional-formatting/
It's also possible to provide the hexcode of color using e.g "#ba3811".
Here is a visual:
I applied the measure to the Default color of the Data colors well of the chart:
I selected this rule
Hopefully, this is what you are looking for.
Regards,
Tom
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 |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |