Hello, and welcome to the forums. I've made the assumption that you are trying to display a train number, and the total number of other trains that were late. If that's not the case, then let us know. However, maybe this will still be useful.
I've re-used your dimension to use as a filter. "Train Number Selector" now filters the train number based on which of your parameter values is selected.
I've created a new variable, "Tran Was Late", to separate out the late trains from the on time trains. You could count them in one step, but I always end up wanting to do things later that need me to create a separate dimension anyway.
I've dragged both of those items to the filter box, set True for the late indicator, and True for the Train selector.
There's one more measure I've created, where it allocates a 1 to each train that is "Train Was Late", and where the train number is not the same as the one selected in the parameter. The FIXED part of that formula tells it to ignore any other filters. FIXED is a Level Of Detail (LOD) function, and they are pretty fundamental to getting things done in Tableau.
That's probably only part of what you want, so feel free to reply.
The attached workbook is in version 10.1.3, hopefully you can open it.
Train Test.twbx 22.3 KB
That was better, but did not quite get me what I wanted.
I thought about the problem more and I was thinking about it wrong. I really need to filter out specific dates based on the status of a train selected in the parameter control.
For example: If the status of train 1200 on 10/1/16 is equal to 'LATE', then include that date, if the status was equal to 'OT', then exclude the date. Once I have excluded the dates where the train ran on time, I can then count the other late trains.