[SalesForce] Filter a report by formula field with image

I have a formula field on an object that displays an image if certain criteria are met:

IF(Anonymous__c ,
    IMAGE("/servlet/servlet.FileDownload?file=015A0000001dCp6",
        "Anonymous - Do Not Contact or Solicit"),
    IF(Another_Condition__c,
        IMAGE("/servlet/servlet.FileDownload?file=015A0000001dCp6",
            "Etc. - Imagine a cascade of conditions"), null))

I'm trying to filter a report to exclude any record that displays an image in this field. I've tried the usual:

Image Filter not equal to <blank>

But it doesn't work. Is there a way to do this?

Best Answer

Consider splitting the logic out into a separate formula for the text and image versions:

Filter_Field__c = IF(Anonymous__c, "Is Anonymous",
                 IF(Another_Condition__c, "Etc. - Imagine a cascade", null))

Image_Field__c = CASE(Filter_Field__c,
                "Is Anonymous", IMAGE(forAnonymous),
                "Etc. - Imagine a cascase", IMAGE(forEtc),
                null)

And then filter your report based on Filter_Field__c.

Related Topic