Thanks Kurt for your reply. I need to preface this by stating that I am not a trained programmer/coder...but have been figuring out what I can from the various resources. At this point, I have the following PROC SQL code: CREATE TABLE WORK.QUERY_INCMNG_WRKD(label="QUERY_INCMNG_WRKD") AS SELECT t1.DATE, /* UW TEAM */ (IFC(t1.ASSIGNEDGROUP="TEAM1","GA/IA/KS", IFC(t1.ASSIGNEDGROUP=" TEAM2","MN/NE", IFC(t1.ASSIGNEDGROUP=" TEAM3","MO", IFC(t1.ASSIGNEDGROUP=" TEAM4","IN/OH", IFC(t1.ASSIGNEDGROUP=" TEAM5","IL", IFC(t1.ASSIGNEDGROUP=" TEAM6","WI", IFC(t1.ASSIGNEDGROUP=" TEAM7","AZ/ID/OR", IFC(t1.ASSIGNEDGROUP=" TEAM8","CO/ND/SD", IFC(t1.ASSIGNEDGROUP="TEAM9","NV/UT/WA","UNKNOWN")))))))))) LABEL="TEAM" AS 'TEAM'n, t1.ASSIGNEDGROUP, t1.LOB, /* INCOMING */ (IFN(t1.STATUS="CREATED",t1.VOLUME_Sum,0)) LABEL="INCOMING" AS INCOMING, /* WORKED */ (IFN(t1.STATUS<>"CREATED",t1.VOLUME_Sum,0)) LABEL="WORKED" AS WORKED FROM WORK.STABSUMMARYTABLESCREATED_WORKED t1; The data looks like this: DATE UW TEAM ASSIGNEDGROUP LOB INCOMING WORKED 06/25/2013 NV/UT/WA TEAM9 AUTO 1 0 07/02/2013 NV/UT/WA TEAM9 AUTO 1 0 07/09/2013 NV/UT/WA TEAM9 AUTO 0 1 07/09/2013 NV/UT/WA TEAM9 AUTO 1 0 07/10/2013 NV/UT/WA TEAM9 AUTO 2 0 07/11/2013 NV/UT/WA TEAM9 AUTO 2 0 07/12/2013 NV/UT/WA TEAM9 AUTO 0 2 07/15/2013 NV/UT/WA TEAM9 AUTO 0 2 07/16/2013 NV/UT/WA TEAM9 AUTO 6 0 I still need to add columns for Begin and End, where the first date has a Begin value of 0 and all subsequent dates have a value equal to the End value from the prior day. The End value should always be equal to Begin + INCOMING - WORKED for the day. I hope that this makes sense. Again, I know that my coding is probably not properly formatted, but I am just learning. Thanks for your help.
... View more