You cannot do this in a calculated column, since a calculated column can only be calculated from the values โโof other columns in the same record.
Instead, you can do this:
CREATE VIEW
v_with_last
AS
SELECT *, CASE asofdate WHEN MAX(asofdate) OVER () THEN 1 ELSE 0 END AS the_last
FROM sometable
Unfortunately, you cannot index this view.