I was having the same issues trying to do a dashboard in AGOL. The Shape.STLength field isn't actually in the enterprise table, but is somehow connected 'on the fly'.
There is probably a better way, but to overcome this, I created a view in SQL Server, then registered that view with the database.
CREATE VIEW [dbo].[_WatermainsView]
AS
SELECT Material, Owner, Shape.STLength() AS Length, Shape.STLength() / 5280 AS Miles, Shape, OBJECTID
FROM dbo.WPRESSURIZEDMAIN
I then load that view instead of the featureclass for my services.
This example will not only have a column named "Length" that is in map units (equal to what the Shape.STLenght() is) as well as as a column named "Miles" that is miles so I don't need to do the convertion in the dashboard or popups.
R_