Nov 7, 2002 #1 kuo Programmer Nov 7, 2002 14 US Hi. I have a table with sales, post_date, I like to calculate total sales for 1/2002 through 10/2002 and prior year 1/2001 through 10/2001. how to do it ? thanks so much for the help
Hi. I have a table with sales, post_date, I like to calculate total sales for 1/2002 through 10/2002 and prior year 1/2001 through 10/2001. how to do it ? thanks so much for the help
Nov 7, 2002 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Add something like this to the record selection criteria: ( {MyTable.MyDate >= date(2002,1,1) and {MyTable.MyDate < date(2002,11,1) ) or ( {MyTable.MyDate >= date(2001,1,1) and {MyTable.MyDate < date(2001,11,1) ) You can create a formula field to group on: If {MyTable.MyDate >= date(2002,1,1) and {MyTable.MyDate < date(2002,11,1) then '1/2002 through 10/2002' else '1/2001 through 10/2001' Now the first group of data will be the 2001 set, the next will be the 2002. You can now use conventional right click insert summary operations on the fields. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com Upvote 0 Downvote
Add something like this to the record selection criteria: ( {MyTable.MyDate >= date(2002,1,1) and {MyTable.MyDate < date(2002,11,1) ) or ( {MyTable.MyDate >= date(2001,1,1) and {MyTable.MyDate < date(2001,11,1) ) You can create a formula field to group on: If {MyTable.MyDate >= date(2002,1,1) and {MyTable.MyDate < date(2002,11,1) then '1/2002 through 10/2002' else '1/2001 through 10/2001' Now the first group of data will be the 2001 set, the next will be the 2002. You can now use conventional right click insert summary operations on the fields. -k http://www.informeddatadecisions.comkai@informeddatadecisions.com