Forum Discussion
Display negative value in a column if a condition is meet in another column
- Jun 16, 2024
Elona105 so if this is your list and the monthly fee column is not formatted it looks like this:
But if you format the column in advanced mode with the following JSON...
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "=if([$SalesActivity] == 'Disconnect', @currentField * -1, @currentField)" }...then change one of the selections in the Sales Activity column to Disconnect the result looks like this:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
Elona105 so if this is your list and the monthly fee column is not formatted it looks like this:
But if you format the column in advanced mode with the following JSON...
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=if([$SalesActivity] == 'Disconnect', @currentField * -1, @currentField)"
}
...then change one of the selections in the Sales Activity column to Disconnect the result looks like this:
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
- Elona105Jun 16, 2024Copper Contributor
Thank you very much Rob_Elliott (microsoft.com). You helped me a lot 🙂