October 31, 200421 yr In reference to the following solution given to me to help create totals of financial records for the previous week, month and year: --------------- Fields: Key_Week = Get( CurrentDate ) >= d_Date and Get( CurrentDate ) - 7 <= d_Date Key_Month = Get( CurrentDate ) >= d_Date and Date( Month( Get( CurrentDate ) ) - 1 ; Day( Get( CurrentDate ) ) ; Year( Get( CurrentDate ) ) ) <= d_Date Key_Year = Get( CurrentDate ) >= d_Date and Date( Month( Get( CurrentDate ) ) ; Day( Get( CurrentDate ) ) ; Year( Get( CurrentDate ) ) - 1 ) <= d_Date These calculations will return a boolean value to match a Key_1 constant field. Table Occurances: Job_System_Week - Key_Week = Key_1 AND Contact_# = Contact_# Job_System_Month - Key_Month = Key_1 AND Contact_# = Contact_# Job_System_Year - Key_Year = Key_1 AND Contact_# = Contact_# Totals: Sum( Job_System_Week::Total_Sale ) Sum( Job_System_Month::Total_Sale ) Sum( Job_System_Year::Total_Sale ) This may not be the best solution because the Sum( ) funsction creates an unstored result, which requires a recalculation each time it is viewed. ------------ This is helpful thank you, but I am still not able to list the correct records to this effect. How do I omit records that are prior to the week, month and year? Can anyone offer me a solution?
November 1, 200421 yr Have a look at this sample file. Let me know if I am not understanding what you are looking for. Sample.zip
Create an account or sign in to comment