How to use calculated column to calculate approved status workflow?
I tried this but it doesn't work.
IF([Approve status]="Pendding", 1, 0)
Looks like you want the calculated column to return a Yes/No value; try this:
IF([Approve status]="Pendding", true, false)
If you are trying to create a calculated column based on approval status column, use formula like:
=IF([Approval Status]="Pending",1,0)
This will return 1
value in calculated column when Approval Status is equal to "Pending" else it will return 0
as value of calculated column.
Calculated column settings:
Follow steps given in my answer to create a calculated column in a list at: Formula does not work for SharePoint/Lists
Note:
,
) does not work in formula (I am not sure but it is based on language or regional settings on your site). In that case use semicolon(;
) instead of comma(,
) at all places in above formula.Update from comments:
If you want to get the count of number of approved, rejected and pending items, easiest way is to use the Grouping in list view on Approval Status column.
Follow Microsoft documentation for more information: Use grouping to modify a list or library view
According to this, the Approval Status field is a lookup field and not applicable for calculated fields. My approach to the issue would be to create a separate calendar view of items with a filter of Approval Status = Pending. This way, approvers can toggle between the approved and pending data and easily distinguish what needs to be approved.
If the answer is helpful, please click "√" on the left panel of the answer and kindly upvote it.
=IF([Approval Status]="Pending",1,0)
for Pending calculated column and=IF([Approval Status]="Approved",1,0)
for Approved calculated column. Refer to the formula & column settings given in my answer.