A calculated field with this logic should get you what you're after.
10 minutes = 600 seconds.
IF DATEDIFF('second',[ScheduledDropoffDateTime],[ActualEndDateTime]) <-600
ELSEIF DATEDIFF('second',[ScheduledDropoffDateTime],[ActualEndDateTime]) <600
THEN 'On Time'
I went ahead and added a calculated field showing the result of the datediff function too in the attached workbook.
OnTimePerformance.twbx.zip 1.1 MB
Perfect! Thank you Mark. This is exactly what I was trying to accomplish. And my very crude formula looked nothing like the formula I actually needed.
If I am not pushing my luck, could you tell me why I cannot re-sort the trip data by scheduled pickup time in both my original worksheet and your modified worksheet? I just wanted to show the trip times from earliest to latest.
Thanks --- William
Glad it worked.
Regarding sorting the table again, Tableau sorts by order of the dimensions (blue "pills") on your shelf.
So if you are trying to sort by a dimension not in the "1st position", you would have to move its position on your shelf.
If you want the sorted data to "appear" in a column other than the first one in your table, you could create a duplicate of the dimension and then place the COPY on the (Rows) shelf in position 1 and sort it in ascending order. Finally, to prevent the data from being displayed twice, you uncheck the "Show Header" from the menu for that pill.