Print Page | Close Window

Summing qty based on full weeks

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21171
Printed Date: 06 May 2024 at 12:20pm


Topic: Summing qty based on full weeks
Posted By: cheryla
Subject: Summing qty based on full weeks
Date Posted: 19 Nov 2014 at 10:13am
I have a report that I need to add up the total shipped for each of the last 4 weeks. It needs to be based on full weeks and not dependent on which day of the week the report is run. This report also includes a cross tab that gives me the total shipped for the year based on a starting date. Eventually I will also need to add in another cross tab to give me the total shipped qty for the prior year (also based on a begin date and end date).

Any suggestions on how to get the weekly total for each of the last 4 weeks? And possibly what formula to get the correct dates for the prior year cross tab?

Thank you in advance for your help.



Replies:
Posted By: DBlank
Date Posted: 20 Nov 2014 at 4:28am

depends on what you are doing about the first 4 weeks of the year? do you straddle back into the prior year ?

For your comaprison back is it based on the weeks of that year or the actual dates of the full weeks - 1 year?


Posted By: cheryla
Date Posted: 20 Nov 2014 at 4:33am
My 2014 year starts on 12-29-13 (full week starting on Sunday)The end of the year will end up being short (ending on 12-27-14-Saturday)


Posted By: DBlank
Date Posted: 20 Nov 2014 at 6:22am

//begin

DATEADD("ww",datediff("ww",date(1900,1,1),today)-4,date(1900,1,1))-1
//end
DATEADD("ww",datediff("ww",date(1900,1,1),today),date(1900,1,1))-2



Print Page | Close Window