0

Ok, I've been working on this most of yesterday and today. I am able to render an image with the following formula -

    ="<div><img src='/xx/xx/PublishingImages/"&IF([Employees Submitted On Time PP1]="Yes","anchor.jpg'> ","hyphen.jpg'>")&"</div>"

But it either picks "yes", or no and blank.

I need to add a "NO" in there and I've tried several formulas, including this one.

    ="<div><img src='/xx/xxx/PublishingImages/"&IF(OR[Employees Submitted On Time PP1]="Yes","anchor.jpg', [Employees Submitted On Time PP1]="No","red-no.jpg'> ","hyphen.jpg'>")&"</div>"

Any help would be greatly appreciated.

user28400
  • 21
  • 1
  • 4

2 Answers2

1
="<div><img src='/xx/xxx/PublishingImages/"
&IF(OR[Employees Submitted On Time PP1]="Yes"
    ,"anchor.jpg', [Employees Submitted On Time PP1]="No"
    ,"red-no.jpg'> ","hyphen.jpg'>")&"</div>"

All I did was copy your Formula and added some line breaks to see where you put all the "

That is where you are going wrong

  • " quotes in the wrong places
  • The OR function has missing/misplaced ()

I presume you want:

="<img src='/xx/xxx/PublishingImages/"
&IF(ISBLANK([Employees Submitted On Time PP1])
    ,"hyphen"
    ,IF([Employees Submitted On Time PP1]
        ,"anchor"
        ,"red-no"
        )
    )
&".jpg'>"
Danny '365CSI' Engelman
  • 21,176
  • 7
  • 35
  • 79
0

Try this below one, if you have used Yes/No column

="<DIV><img src='"&IF([Completed?], "/_layouts/images/KPIDefault-
0.GIF", "/_layouts/images/KPIDefault-2.GIF")&"'></DIV>"

Ref : http://www.dreamsharepoint.com/sharepoint-2010-simple-kpi-using-calculated-columns/

Nagaraju Pattem
  • 1,020
  • 1
  • 15
  • 21