The List in the view displays calculated column values correctly, but when I filter the same column it shows the formula instead of values. How can I resolve this to show calculated values in the filter.

My formula in the calculated column is -

="<img src='/_layouts/images/blank.gif' onload=""{"&" var day=new Date();"&" var SPday=new Date(); "&"  SPday.setFullYear("&YEAR(ITGCreationDate)&","&MONTH(ITGCreationDate)-1&","&DAY(ITGCreationDate)&");"&" var m=Math.ceil(Math.abs(SPday.getTime()-day.getTime()) /(1000*3600*24)); "&" this.parentNode.innerHTML=m; "&"}"">"

And here is the display of filter, showing formula, not values.

enter image description here

And this image is of the same calculated column, without filter, showing value. enter image description here Thank you.

3 Answers 3


As mentioned here, using javascript in calculated columns has been deprecated

On June 13th 2017 all SharePoint calculated columns with HTML markup stopped working

  • There you have it. So it seems there is no easy solution available as of now. Thank you for taking the time to post this useful message.
    – Selvam
    Nov 13, 2017 at 6:05
  • Hi Emaborsa, can you please take a look at this SharePoint workflow question that is receiving no attention. Appreciate you help please. sharepoint.stackexchange.com/questions/229904/…
    – Selvam
    Nov 13, 2017 at 6:07
  • You already have received 2 answers.... do you need anything else?
    – Emaborsa
    Nov 13, 2017 at 9:22
  • Thank you for the comments on workflow. I am a novice to SharePoint, I will explore your answers further. Thanks again.
    – Selvam
    Nov 13, 2017 at 10:14

In your calculated column you have an image. You can not filter by image.

You could use another calculated columnd and put inside the value that you expect to be filtered.

  • My calculated column, 'Aging', is not an image. Data type = Number. What you are seeing in the filter display is the Formula in the Calculated column, which is the problem here. I want to display the value not the formula.
    – Selvam
    Nov 13, 2017 at 4:54

What is your "Data Type" for the Calculated column? Please select Number as your type in calculated column for showing images in Calculated columns.

  • data type is NUMBER
    – Selvam
    Nov 13, 2017 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.