Forum Discussion
jacob_n
Oct 14, 2021Copper Contributor
SharePoint calculated column formula help
I have a calculated column formula performing a basic subtraction operation between two other columns; call it "cost" column and "account balance" column. The product of the calculated column is displayed in a "remaining cost" column. The intention is to trigger a flow if the cost exceeds the account balance, showing a positive value in the remaining balance column.
For example:
Cost = $12. Account balance =$10. Remaining cost (calculated column) = $2
The formula looking like, =[Account balance]-[Cost]
However, if the account balance is greater than the cost, the Remaining cost is displayed as a negative number.
Cost = $10. Account balance = $12. Remaining cost = ($2)
Is there a way to perform the calculation, but limit the minimum value to be zero?
Try the following:
=IF([Account balance]-[Cost]<0,0,[Account balance]-[Cost])
If this resolves your issue, please mark it as the answer. Thank you!
Try the following:
=IF([Account balance]-[Cost]<0,0,[Account balance]-[Cost])
If this resolves your issue, please mark it as the answer. Thank you!- jacob_nCopper Contributor
Don Kirkham Thanks for the reply. That worked well.