I agree with @IraWatt ... more details are required. I looked at your data and I believe that your first step would be to split the data into 2 data flows, one for "open" and the other for "clearing". Then you'll need to manipulate the data so that you can then join the two streams together. Finally perform the final calculation. When I looked at your data, I split the stream and then summarized both streams by PC. The summarization totals for all PC "clearing" rows became Zero (0). So I'm at a loss of how to process and join your data set to get the information you require.