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 have a couple things I can't figure out regarding conditional formating and colors
-Is there a way to bind a color to a field value? I have a True/false field in my report that I use a lot; I would like to always have Green/red colors when I use this field as a legend when I create a new chart. That seems like a basic functionality for report consistency but I can't find it.
-In Table conditional formating, how can I format based on the same value ? I want to have a green/red cell based on the value of the same boolean but it seems it only work with aggregation or color code. Do i need to have a 1/0 field or a color code field in addition to my boolean to achieve this ?
Thanks for your support
Solved! Go to Solution.
Hi @Anonymous ,
From my test, conditional formatting could be applied for Data color ,but it seems not reach the same output as in table.
I suggest you use custom theme instead like this:
Please take a look at the different output shown below:
But this is at idea/feedback level alone. Please let the power bi community to know this things and give your votes at power bi site's feedback - https://ideas.powerbi.com/ideas/idea/?ideaid=31fd95a4-308f-4a28-a3d4-10489b973642
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
From my test, conditional formatting could be applied for Data color ,but it seems not reach the same output as in table.
I suggest you use custom theme instead like this:
Please take a look at the different output shown below:
But this is at idea/feedback level alone. Please let the power bi community to know this things and give your votes at power bi site's feedback - https://ideas.powerbi.com/ideas/idea/?ideaid=31fd95a4-308f-4a28-a3d4-10489b973642
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Hi @Anonymous ,
To do this you can create a measure that will do the condittional formatting on all your visualizations. You need to do something similar to:
Condittional Formatting =
SWITCH(SELECTEDVALUE(Table[Column]);
True(); "Green";
False(); "Red"
)
The just use this measure on all the formatting fields you needs.
Two remarks about the measure above:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi Miguel,
Thanks for the tip, having this in a measure works works well for formating my table.
However in other charts (ex: stacked bar charts or donut), I don't see any way to use this, I have no formula option in the "Data color" pane when I have a field used as a legend. So I see no way of permanently bind a field value to a color. As a previous Tableau and Qlik user, that seems like a serious shortcoming for PowerBI .
When you use the legend on a visualization some of the features aren't available that is the case of the condittioonal formatting you need to use measures or columns on your visualization.
I don't know the exact setup of your model but if you create a measure for true and false you are able to then make the condittioonal formatting
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
65 | |
45 | |
39 | |
31 |
User | Count |
---|---|
164 | |
111 | |
61 | |
53 | |
38 |