DISTINCT won't help the OP, because there really aren't any distinct rows here.
I found a query that would solve the second case. I added 6 rows at the bottom that duplicate the max times for each asset, plus added an X variable. Here is the table:
And here is the query that works (it requires one subquery and one subquery within a subquery)):
The custom expression is:
t1.Time = (SELECT MAX(tInner.Time) FROM parts tInner WHERE t1.Asset = tInner.Asset)
AND
t1.X = (SELECT MAX(tInner.X) FROM parts tInner WHERE t1.Asset = tInner.Asset AND
tInner.Time = (SELECT MAX(tInner2.Time) FROM parts tInner2 WHERE tInner.Asset = tInner2.Asset))
I capitalized all the SQL keywords to make it easier to read. I tried some simpler queries, but they did not work.
HTH,
Eric