chrisamuel
asked on
Quarterly Data
This works to get quarterly data:
Quarter: Format([DateReceived],"yyy y" & "-" & "q")
But I have two problems: The numbers are off by one in Quarter 4 2004 and Quarter 1 2005, and I can't figure out what's going on.
I'm also using this in the where clause in hopes to only show the current 4 quarters for field [DateReceived]:
>=((Date()-Month(Date())+1 )-390)
But I'm getting 5 quarters.
Quarter: Format([DateReceived],"yyy
But I have two problems: The numbers are off by one in Quarter 4 2004 and Quarter 1 2005, and I can't figure out what's going on.
I'm also using this in the where clause in hopes to only show the current 4 quarters for field [DateReceived]:
>=((Date()-Month(Date())+1
But I'm getting 5 quarters.
ASKER
what i meant was the count of a field was off by one in quarter 4 2004 and also off by one in quarter 1 2005. This,
>=((Date()-Month(Date())+1 )-390) was in hopes of showing only the current 4 quarters. I took it from a query grouped monthly and thought it would work.
>=((Date()-Month(Date())+1
<what i meant was the count of a field was off by one in quarter 4 2004 >
i still don't understand why you are trying to count the fields. Can you post some data.
show what you are expecting to get and what is missing.
i still don't understand why you are trying to count the fields. Can you post some data.
show what you are expecting to get and what is missing.
WHERE year(DateReceived) = year(Date()) will limit you to quarters for this year.
WHERE year(DateReceived) = year(Date())-1 will limit you to quarters from last year, etc.
WHERE year(DateReceived) = year(Date())-1 will limit you to quarters from last year, etc.
ASKER
Here's what I'm trying to do:
SELECT Format([DateReceived],"yyy y" & "-" & "q") AS Quarter, Count(ATS_WACH.DateReceive d) AS [Leads Received], Sum(IIf([Disposition]="Dea d",1,0)) AS [Inactive Leads], Sum(IIf([Disposition] Not In ("ApTaken/Recd Inc","Dead"),1,0)) AS [Active Leads], Sum(IIf([Disposition]="ApT aken/Recd Inc",1,0)) AS [Locked Apps], ([Locked Apps]+[Active Leads])/[Leads Received] AS [Net Conversion], [Locked Apps]/[Leads Received] AS [Actual Conversion], Sum(IIf([Status]="APP",1,0 )) AS [Customers In Process], Sum(IIf([Status]="CAN",1,0 )) AS [Customers Cancelled], Sum(IIf([Status]="FND",1,0 )) AS [Customers Funded], Sum(IIf([Status]="FND",[Cu rramt],0)) /1000000 AS [Loans Funded Dollars], ([Customers Funded]+[Customers In Process])/[Locked Apps] AS [Net App To Fund], IIf([Locked Apps]=0,0,([Customers Funded]/[Locked Apps])) AS [Actual App To Fund], IIf([Leads Received]=0,0,(([Customers Funded]+[Customers In Process])/[Leads Received])) AS [Net Lead To Fund], IIf([Leads Received]=0,0,([Customers Funded]/[Leads Received])) AS [Actual Lead To Fund]
FROM ATS_WACH
WHERE ((([ATS_WACH].[DateReceive d])>=((Dat e()-Month( Date())+1) -390)))
GROUP BY Format([DateReceived],"yyy y" & "-" & "q");
GrayL, I was trying to get the 4 current quarters, so as of right now, I would need two quarters from last year and the two current quarters from this year and for some reason I'm getting 5 quarters...
SELECT Format([DateReceived],"yyy
FROM ATS_WACH
WHERE ((([ATS_WACH].[DateReceive
GROUP BY Format([DateReceived],"yyy
GrayL, I was trying to get the 4 current quarters, so as of right now, I would need two quarters from last year and the two current quarters from this year and for some reason I'm getting 5 quarters...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what do you mean by off by one quarter? can you give example?
also, from this statement
>=((Date()-Month(Date())+1
do you want the second day of the month ?
this will give the first day of the month
DateSerial(Year(Date), Month(Date), 1)
if you want the second day
DateSerial(Year(Date), Month(Date), 2)