Consider using IIF(). Here is an example of using the last value instead of the -6999 in a min run over a day with temp avg:
Alias(X, "Server:CR1000.HOUR.Temp_F_Avg"); StartRelativeToNewest (nsecPerDay, OrderCollected ); MinRunOverTime(IIF(X = -6999, last(X), X), Timestamp(X), nsecPerDay)