Shows a #value! When using calculated fields on a pivot table [Closed]

Hello everyone

I would like to input a calculated field in the excel pivot table. I have input an formula as if(ERP (Variable)>0, "Yes", "No"). It seems that the value shown on the pivot table was #value!.

However, if I were to use the formula on the raw data, it will meet the command if Yes, No.

Please advise