Hi,
I have a table consisting of the below columns. I need to sum up all Qty Passed per Product. This is simple. I just need to create a group and Insert Group Summary on Qty Passed. Now comes the tricky part. I also need to sum up all Qty Failed where we have the maximum timestamp for each TIS #. In this case, it is 5 + 65 = 70.
Appreciate any thoughts on how to do this computation.
Data
----
Product TIS# Qty Passed Qty Failed Timestamp
-------+------+-----------+------------+-------------------------
ABCD 01 100 10 02/01/2008 11:00:00 AM
ABCD 01 50 5 02/01/2008 11:30:00 AM <-- Max Timestamp for TIS #1
ABCD 02 20 25 02/01/2008 08:00:00 AM
ABCD 02 30 35 02/01/2008 08:30:00 AM
ABCD 02 40 65 02/01/2008 09:00:00 AM <-- Max Timestamp for TIS #2
Result
------
Product Qty Passed Qty Failed
-------+------------+----------------------
ABCD 240 70 (5 + 65)