ShowAll Questionssorted byDate Posted
Felix Quinones

# Custom formula field receives error when value is left blank.

Hello All,
I'm trying to fix the following formulas that are showing an error when the value is left blank. In our object, black field are important because means that they do not apply. The fields that are showing an error are Q1 Results and Q1 Flag.

Field: Q1 Results
IF(
ISNULL( Q1_Validation__c ),
NULL,
Q1_Value__c / Q1_Goal__c
)

Field: Q1 Validation
IF(
AND(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c )),
NULL,1)

Field: Q1 Flag
(
IF( ISBLANK(Q1_Goal__c ) && ISBLANK(Q1_Value__c ),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),

IF(ISBLANK(Q1_c__c ),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),

IF (Q1_c__c <= 0.80,
IMAGE("https://i.ibb.co/02GzKqM/red-flag.png", " Red Flag"),

IF (Q1_c__c <= 0.90,
IMAGE("https://i.ibb.co/59L8GnF/yellow-flag.png", " Yellow Flag"),
IMAGE("https://i.ibb.co/1KNswzk/green-flag.png", " Green Flag"))))))

I appreciate all your help.

Best Answer chosen by Felix Quinones
CharuDutt
Hii Felix
Try Below Formula
```Field: Q1 Flag

If(And(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c)),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(ISBLANK(Q1_c__c ),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(Q1_c__c <= 0.80,IMAGE("https://i.ibb.co/02GzKqM/red-flag.png"," Red Flag"),
IMAGE("https://i.ibb.co/1KNswzk/green-flag.png", " Green Flag"))))

Field: Q1 Validation

IF(AND(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c )),null,'1')

Field: Q1 Results

IF(NOT(ISNULL( Q1_Validation__c)),Q1_Value__c / Q1_Goal__c,null)
```
Please Mark It As best Answer If It Helps
Thank You!

### All Answers

CharuDutt
Hii Felix
Try Below Formula
```Field: Q1 Flag

If(And(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c)),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(ISBLANK(Q1_c__c ),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(Q1_c__c <= 0.80,IMAGE("https://i.ibb.co/02GzKqM/red-flag.png"," Red Flag"),
IMAGE("https://i.ibb.co/1KNswzk/green-flag.png", " Green Flag"))))

Field: Q1 Validation

IF(AND(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c )),null,'1')

Field: Q1 Results

IF(NOT(ISNULL( Q1_Validation__c)),Q1_Value__c / Q1_Goal__c,null)
```
Please Mark It As best Answer If It Helps
Thank You!
This was selected as the best answer
Felix Quinones
Thank you. That works. The problem was the Q1 results.
Jack Torres
```Field: Q1 Flag

If(And(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c)),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(ISBLANK(Q1_c__c ),
IMAGE("https://i.ibb.co/PzwzmbZ/blue-flag.png", " Blue Flag"),
If(Q1_c__c <= 0.80,IMAGE("https://i.ibb.co/02GzKqM/red-flag.png"," Red Flag"),
IMAGE("https://i.ibb.co/1KNswzk/green-flag.png", " Green Flag"))))

Field: Q1 Validation

IF(AND(ISBLANK(Q1_Goal__c ),ISBLANK(Q1_Value__c )),null,'1')

Field: Q1 Results

IF(NOT(ISNULL( Q1_Validation__c)),Q1_Value__c / Q1_Goal__c,null)```
This one did not work for me. I do not get what went wrong