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
Felix QuinonesFelix Quinones 

Display an Image according to result of a Formula.

Hello All, 

I'm realatively new to salesforce and I'm trying to develop a formula that respond with an image to the result of another formula. The current formula worked, except when the result of the original formula is 0.00 or blank. 

Specifically, the formula below is looking for the result of Q1_c_c (Compliance for Quarter 1). I want a blue flag if there is a 0.00 (we are not measuring that quarter) or no information or result. 

IF (Q1_c__c <= 0.01,
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 will appreciate the help. 
Best Answer chosen by Felix Quinones
ravi soniravi soni
Hello Felix,
your formula is working fine. if we put 0.00 then blue flag is showing.but I think you want to blue flag when field value is 0.00 or blank.
then simply you can apply following formula.
IF (OR(Q1_c__c  <= 0.01, 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"))))

let me know if it helps you and mark it as best answer.
Thank you​​​​​​​

All Answers

ravi soniravi soni
Hello Felix,
your formula is working fine. if we put 0.00 then blue flag is showing.but I think you want to blue flag when field value is 0.00 or blank.
then simply you can apply following formula.
IF (OR(Q1_c__c  <= 0.01, 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"))))

let me know if it helps you and mark it as best answer.
Thank you​​​​​​​
This was selected as the best answer
Suraj Tripathi 47Suraj Tripathi 47
Hi Felix,
Greetings!

You can use this syntax for display image in the formula is-
IMAGE(image URL, alternate text, height, width)

If you find your Solution then mark this as the best answer. 

Thank you!

Regards,
Suraj Tripathi
Felix QuinonesFelix Quinones
Veer Soni and Suraj, 

Thanks for your repplies. 

Veer, is there a way that the first part of the formula respond also to a N/A

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

Thanks again to both of you. 

Felix