Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Summing qty based on full weeks Post Reply Post New Topic
Author Message
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet Topic: Summing qty based on full weeks
    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.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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?
IP IP Logged
cheryla
Groupie
Groupie


Joined: 23 Oct 2013
Online Status: Offline
Posts: 51
Quote cheryla Replybullet 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)
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.