Function field treated as text in Pivot Chart

Function field treated as text in Pivot Chart

Hope someone can help with this issue, as cannot find anything on this in the support field.

I am creating a new Pivot Chart where are need to use a function field to do averages, however, for some reason the given function field is being read as a multiline text? 

The function reads as below where the two first referred fields are nubmer fields and the two last referred fields are time and date fields.

 ((input.SEM_SCH01_16_TD_ID16 + input.SEM_SCH01_19_TL_ID19) / (((input.SEM_SCH01_33_ATD_ID33 - input.SEM_SCH01_32_ATA_ID32)) / (1000 * 60 * 60))).round(1)