function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Katy Watson.AdminKaty Watson.Admin 

Warning Incorrect parameter type for function 'IF()'. Expected Number, received Text

Hi 

I'm trying to create a report using the IF Function but am receiving the "Warning Incorrect parameter type for function 'IF()'. Expected Number, received Text" error message. 

The formula I'm trying to make work is: 
IF(Field 1 > 0.00, Field 2 - Field 1, "") 

All Fields in the formula are set as Currency fields. 

Thanks
Katy 
HarshHarsh (Salesforce Developers) 
Hi Katy,
Try the below code.
IF(Field 1 > 0.00, Field 2 - Field 1, 0)

Please mark it as Best Answer if the above information was helpful.

Thanks.


 
Naresh Kaneriya 9Naresh Kaneriya 9

Hi Katy,

Your IF function to calculate a value based on the values of two currency fields. The error message you're encountering, "Warning Incorrect parameter type for function 'IF()'. Expected Number, received Text," suggests that the IF function is expecting a numeric value, but it's receiving a text value instead.

 

To resolve this issue, you should ensure that the formula you're using is constructed correctly. Here's how you can modify the formula to work correctly:

IF(Field1 > 0.00, Field2 - Field1, 0.00)

In this formula, I replaced the empty text ("") with 0.00

Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.

Thanks, Naresh