Forum Discussion
Conditional formatting
Walterwhamil72 this can be done as follows. In your calculated column use the following formula:
The formatting of the column is then like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=[$Percent]*100 + '%'",
"style": {
"color": "=if([$Percent] >= 0.75 , '#ffffff', '#525252'",
"background-color": "= if(([$Percent] >= 0.75 && [$Percent] < 0.90 , '#eebf2d', if(([$Percent] > 0.90, '#730000'), '#ffffff'"
}
}
which gives the following result:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- Walterwhamil72Feb 26, 2021Copper Contributor
RobElliott Thanks for the guidance. I followed your instructions but the column is now blank. The column names I need in the calculation are:
Cumulative Invoiced/Total Value
The formula I'm using looks like this:
My JSON looks like this:
The Burn Rate column looks like this now:
Walt.
- RobElliottFeb 26, 2021Silver Contributor
Walterwhamil72 the reason it's not working is that in your JSON you've used my column which is called Percent. You've got to use your burn rate column name - as you've got a space in the name check what SharePoint has called it internally in List settings, select the column and check what is after field= in the address bar.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- Walterwhamil72Feb 26, 2021Copper Contributor
RobElliott Everything is working correctly. Thanks for your assistance.